#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  vector<int> nul, one;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    char cur;
    cin >> cur;
    if (cur == '0') {
      nul.push_back(i);
    } else {
      one.push_back(i);
    }
  }
  if (!nul.size() || !one.size()) {
    cout << "tokitsukaze\n";
    return 0;
  }
  int n1 = nul.front(), n2 = *(--nul.end()), o1 = one.front(),
      o2 = *(--one.end());
  if (n2 - n1 < k || o2 - o1 < k) {
    cout << "tokitsukaze\n";
    return 0;
  }
  if (n2 < o1 || o2 < n1) {
    cout << "once again";
    return 0;
  }
  vector<int> s = {n1, n2, o1, o2};
  sort(s.begin(), s.end());
  if (s[3] - s[1] <= k && s[2] - s[0] <= k && s[2] - s[1] < k) {
    cout << "quailty";
    return 0;
  }
  cout << "once again";
  return 0;
}
