#include <bits/stdc++.h>
int solve();
int main(int, char**) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  int Q = 1;
  while (Q--) solve();
  return 0;
}
int n, K, T;
int a[100008], sum[100008];
char s[100008];
void read_data() {
  scanf("%d%d", &n, &K);
  scanf("%s", s);
  sum[0] = 0;
  for (int i = 1; i <= n; ++i) {
    a[i] = s[i - 1] ^ '0';
    sum[i] = sum[i - 1] + a[i];
  }
  sum[n + 1] = sum[n];
}
bool check_first() {
  for (int i = 1; i + K - 1 <= n; ++i) {
    int q = sum[i - 1] + sum[n] - sum[i + K - 1];
    if (q == 0 || q + K == n) return true;
  }
  return false;
}
bool check_second() {
  if (K * 2 < n || K == 1) return false;
  int Len = n - K - 1;
  for (int i = 2; i <= Len; ++i) {
    if (a[i] != a[i - 1]) return false;
    if (a[n - i + 1] != a[n - i + 2]) return false;
  }
  if (a[1] == a[n]) return false;
  if (a[Len] == a[Len + 1]) return false;
  if (a[n - Len] == a[n - Len + 1]) return false;
  return true;
}
int solve() {
  read_data();
  if (check_first())
    puts("tokitsukaze");
  else if (check_second())
    puts("quailty");
  else
    puts("once again");
  return 0;
}
