#include <bits/stdc++.h>
using namespace std;
int sum[100005];
char c[100005];
int n, k;
int gsum(int x, int y) { return x <= y ? sum[y] - sum[x - 1] : 0; }
int main() {
  scanf("%d%d%s", &n, &k, c + 1);
  for (int i = 1; i <= n; i++) sum[i] = c[i] - '0' + sum[i - 1];
  bool f = 0;
  for (int i = 1; i <= n - k + 1; i++)
    f = f || (gsum(1, i - 1) + gsum(i + k, n) == n - k ||
              gsum(1, i - 1) + gsum(i + k, n) == 0);
  if (f) return 0 * printf("tokitsukaze");
  if (k == 1 || k * 2 < n) return 0 * printf("once again");
  if (gsum(1, n - k - 1) != 0 && gsum(1, n - k - 1) != n - k - 1)
    return 0 * printf("once again");
  if (gsum(k + 2, n) != 0 && gsum(k + 2, n) != n - k - 1)
    return 0 * printf("once again");
  if (c[n - k - 1] == c[n - k] || c[k + 1] == c[k + 2] || c[1] == c[n])
    return 0 * printf("once again");
  printf("quailty");
  return 0;
}
