#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
vector<int> one, zero;
int a[MAXN + 5];
int n, k;
char x;
bool Check1() {
  if (one.size() == 0 || zero.size() == 0 || k >= n) return true;
  int lz = -1, rz = -1, lo = -1, ro = -1;
  for (int i = 1; i <= n; i++) {
    if (lz == -1 && a[i] == 0) lz = i;
    if (lo == -1 && a[i] == 1) lo = i;
    if (lz != -1 && lo != -1) break;
  }
  for (int i = n; i >= 1; i--) {
    if (rz == -1 && a[i] == 0) rz = i;
    if (ro == -1 && a[i] == 1) ro = i;
    if (rz != -1 && ro != -1) break;
  }
  if (k >= min(ro - lo + 1, rz - lz + 1)) return true;
  return false;
}
bool Check2() {
  if (k == 1) return false;
  if (2 * k < n) return false;
  int len = n - k;
  for (int i = 3; i < len; i++) {
    if (a[i - 1] != a[i - 2] || a[i + k] != a[i + k + 1]) return false;
  }
  if (a[1] == a[n] || a[1] == a[k + 2] || a[n] == a[n - k - 1]) return false;
  return true;
}
int main() {
  scanf("%d%d\n", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%c", &x);
    a[i] = x - '0';
    if (a[i] == 1)
      one.push_back(i);
    else
      zero.push_back(i);
  }
  if (Check1())
    printf("tokitsukaze");
  else if (Check2())
    printf("quailty");
  else
    printf("once again");
  return 0;
}
