#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, m, k;
int f() {
  cin >> n >> k;
  string s;
  cin >> s;
  vector<vector<int>> md = {{1, n}, {1, n}};
  vector<int> cnt = {0, 0};
  for (int i = 0; i < n; i++) {
    cnt[s[i] - '0']++;
    md[s[i] - '0'][0] = max(md[s[i] - '0'][0], i);
    md[s[i] - '0'][1] = min(md[s[i] - '0'][1], i);
  }
  vector<int> tmp = {0, 0};
  for (int i = 0; i < k; i++) {
    tmp[s[i] - '0']++;
  }
  if (tmp[0] == cnt[0] || tmp[1] == cnt[1]) return 1;
  for (int i = k; i < n; i++) {
    tmp[s[i - k] - '0']--;
    tmp[s[i] - '0']++;
    if (tmp[0] == cnt[0] || tmp[1] == cnt[1]) return 1;
  }
  if (md[0][0] - md[0][1] > k || md[1][0] - md[1][1] > k) return 2;
  if (md[0][0] - md[0][1] == k || md[1][0] - md[1][1] == k) {
    if (md[0][0] <= md[1][1] || md[1][0] <= md[0][1]) return 2;
  }
  return 0;
}
void solve() {
  int ans = f();
  if (ans == 1)
    cout << "tokitsukaze" << endl;
  else if (ans == 0)
    cout << "quailty" << endl;
  else
    cout << "once again" << endl;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  solve();
}
