#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 3;
int pref[MAXN];
bool pre[MAXN];
bool suf[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, x;
  string ss;
  cin >> n >> k;
  cin >> ss;
  for (int i = 0; i < n; i++) {
    pref[i + 1] = pref[i];
    if (ss[i] == '1') pref[i + 1]++;
  }
  for (int i = k; i <= n; i++) {
    x = pref[i - k] + pref[n] - pref[i];
    if (x == 0 || x == n - k) {
      printf("tokitsukaze");
      return 0;
    }
  }
  pre[0] = suf[n + 1] = true;
  for (int i = 1; i <= n; i++) {
    pre[i] = pre[i - 1];
    if (!pre[i] || i <= k) continue;
    if (ss[i - 1] == '0') {
      if (pref[i - k] != i - k) pre[i] = false;
    } else {
      if (pref[i - k] != 0) pre[i] = false;
    }
  }
  for (int i = n; i > 0; i--) {
    suf[i] = suf[i + 1];
    if (!suf[i] || i > n - k) continue;
    if (ss[i - 1] == '0') {
      if (pref[n] - pref[i + k - 1] != n - i - k + 1) suf[i] = false;
    } else {
      if (pref[n] - pref[i + k - 1] != 0) suf[i] = false;
    }
  }
  if (!suf[k + 1] || !pref[n - k]) {
    printf("once again");
    return 0;
  }
  for (int i = k + 1; i < n; i++) {
    if (pref[i - k] == i - k && suf[i + 1] && i - k <= k &&
        pref[n] - pref[i] == 0)
      continue;
    if (pref[i - k] == 0 && suf[i + 1] && i - k <= k &&
        pref[n] - pref[i] == n - i)
      continue;
    printf("once again");
    return 0;
  }
  printf("quailty");
  return 0;
}
