#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[1000005], s[1000005];
inline int qs(int x, int y) {
  if (x > y) return 0;
  return s[y] - s[x - 1];
}
inline bool calc1() {
  for (int i = 1; i <= n - k + 1; i++) {
    int r = qs(1, i - 1) + qs(i + k, n);
    if (!r || r + k == n) return 1;
  }
  return 0;
}
inline bool calc2() {
  if (k * 2 < n || k == 1) return 0;
  int l = n - k - 1;
  for (int i = 2; i <= l; ++i) {
    if (a[i] != a[i - 1] || a[n - i + 1] != a[n - i + 2]) return 0;
  }
  if (a[l] == a[l + 1] || a[n - l] == a[n - l + 1] || a[1] == a[n]) return 0;
  return 1;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) scanf("%1d", &a[i]), s[i] = s[i - 1] + a[i];
  puts(calc1() ? "tokitsukaze" : (calc2() ? "quailty" : "once again"));
}
