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