#include <bits/stdc++.h>
const int N = 100002;
int n, k, l[N], r[N];
char s[N];
bool check1() {
  if (n == k || l[n] == 1 || r[1] == n || l[n - k] == 1 || r[k + 1] == n)
    return 1;
  for (int i = 2; i <= n - k; i++)
    if (s[i - 1] == s[i + k] && l[i - 1] == 1 && r[i + k] == n) return 1;
  return 0;
}
bool check2() {
  if ((k << 1) < n) return 0;
  for (int i = 2; i <= n - k; i++)
    if (l[i - 1] != 1 || r[i + k] != n) return 0;
  return 1;
}
int main() {
  scanf("%d %d %s", &n, &k, s + 1);
  l[1] = 1;
  r[n] = n;
  for (int i = 2; i <= n; i++) l[i] = s[i] == s[i - 1] ? l[i - 1] : i;
  for (int i = n - 1; i >= 1; i--) r[i] = s[i] == s[i + 1] ? r[i + 1] : i;
  if (check1()) return !printf("tokitsukaze\n");
  if (check2()) return !printf("quailty\n");
  printf("once again\n");
  return 0;
}
