#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  char c;
  int q = n, p = 0, o = n, r = 0, i = 1;
  while (cin >> c) {
    if (c == '0')
      q = min(q, i), p = max(p, i);
    else
      o = min(o, i), r = max(r, i);
    ++i;
  }
  if (!p || !r || p - q < k || r - o < k) {
    cout << "tokitsukaze";
    return 0;
  }
  int s[4] = {q, p, o, r};
  sort(s, s + 4);
  if (p < o || r < q || s[3] - s[1] > k || s[2] - s[0] > k || s[2] - s[1] > k)
    cout << "once again";
  else
    cout << "quailty";
}
