#include <bits/stdc++.h>
using namespace std;
int ar[100005], sum[100005], n, k;
bool judge1() {
  for (int i = 0; i + k <= n; i++) {
    int tem = sum[i] + sum[n] - sum[i + k];
    if (tem == 0 || tem == n - k) return true;
  }
  return false;
}
bool judge2() {
  if (k * 2 < n) return false;
  for (int i = 2; i <= n - k - 1; i++) {
    if (ar[i] != ar[i - 1] || ar[n + 1 - i] != ar[n + 2 - i]) return false;
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%1d", &ar[i]);
    sum[i] = sum[i - 1] + ar[i];
  }
  if (sum[n] == n || sum[n] == 0) {
    printf("tokitsukaze\n");
    return 0;
  }
  if (judge1()) {
    printf("tokitsukaze\n");
  } else {
    if (judge2()) {
      printf("quailty\n");
    } else
      printf("once again\n");
  }
}
