#include <bits/stdc++.h>
const int N = 1e5;
static inline char Get_Char() {
  static char buffer[100000], *S = buffer, *T = buffer;
  if (S == T) {
    T = (S = buffer) + fread(buffer, 1, 100000, stdin);
    if (S == T) return EOF;
  }
  return *S++;
}
static inline int Read() {
  int f = 1, x = 0;
  register char sign = getchar();
  for (; sign > '9' || sign < '0'; sign = getchar())
    if (sign == '-') f = -1;
  for (; sign >= '0' && sign <= '9'; sign = getchar())
    x = (x << 3) + (x << 1) + (sign ^ 48);
  return x * f;
}
bool val[N + 1];
int l[N + 1], r[N + 1], n, k;
inline bool Check1() {
  if (k == n || k == n - 1 || l[n - k] == 1 || r[k + 1] == n) return 1;
  for (register int i = 2; i <= n - k && l[i - 1] == 1; ++i) {
    if (l[i - 1] == 1 && r[i + k] == n && val[i - 1] == val[i + k]) return 1;
  }
  return 0;
}
inline bool Check2() {
  if ((k << 1) < n) return 0;
  for (register int i = 2; i <= n - k; ++i) {
    if (l[i - 1] != 1 || r[i + k] != n) return 0;
  }
  return 1;
}
int main() {
  n = Read(), k = Read();
  for (register int i = 1; i <= n; ++i) {
    scanf("%1d", &val[i]);
  }
  l[1] = 1;
  for (register int i = 2; i <= n; ++i) {
    l[i] = val[i] == val[i - 1] ? l[i - 1] : i;
  }
  r[n] = n;
  for (register int i = n - 1; i >= 1; --i) {
    r[i] = val[i] == val[i + 1] ? r[i + 1] : i;
  }
  if (Check1()) return !printf("tokitsukaze\n");
  if (Check2()) return !printf("quailty\n");
  printf("once again\n");
  return 0;
}
