#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f * x;
}
char ch[100005];
int n, k, s[100005], sum[100005];
inline bool check1() {
  int mx = n - k + 1;
  for (int i = 1; i <= mx; i++) {
    int cnt = sum[i - 1] + sum[n] - sum[i + k - 1];
    if (!cnt || cnt == n - k) return 1;
  }
  return 0;
}
inline bool check2() {
  int len = n - k - 1;
  if (k == 1 || (k << 1) < n) return 0;
  for (int i = 2; i <= len; i++)
    if (s[i] != s[i - 1] || s[n - i + 1] != s[n - i + 2]) return 0;
  if (s[len] == s[len + 1] || s[n - len] == s[n - len + 1] || s[1] == s[n])
    return 0;
  return 1;
}
signed main() {
  n = read();
  k = read();
  scanf("%s", ch + 1);
  for (int i = 1; i <= n; i++) s[i] = ch[i] - '0', sum[i] = sum[i - 1] + s[i];
  if (check1()) return 0 & puts("tokitsukaze");
  if (check2()) return 0 & puts("quailty");
  return 0 & puts("once again");
}
