#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int N = 2e5 + 5;
int n, k;
string str;
vector<int> v[2];
bool once() {
  if (str.size() <= k) return 1;
  return (v[0].back() - v[0].front() + 1 <= k) ||
         (v[1].back() - v[1].front() + 1 <= k);
}
int get_len(int l, int r, bool i) {
  int qs = v[i].front();
  int qe = v[i].back();
  if (qs >= l && qs <= r) qs = *upper_bound(v[i].begin(), v[i].end(), r);
  if (qe >= l && qe <= r) {
    auto it = lower_bound(v[i].begin(), v[i].end(), l);
    qe = *--it;
  }
  return qe - qs + 1;
}
bool nxt() {
  for (int i = 0; i + k <= n; ++i) {
    int len1 = get_len(i, i + k - 1, 1);
    int len2 = get_len(i, i + k - 1, 0);
    if (len1 > k || len2 > k) return 0;
  }
  return 1;
}
int main() {
  cin >> n >> k >> str;
  for (int i = 0; i < str.size(); ++i) v[str[i] - '0'].push_back(i);
  if (v[0].size() == 0 || v[1].size() == 0) return cout << "tokitsukaze", 0;
  if (once()) return cout << "tokitsukaze", 0;
  if (nxt()) return cout << "quailty", 0;
  cout << "once again";
  return 0;
}
