#include <bits/stdc++.h>
using namespace std;
const int N = 202019;
int n, k, a[N], s[N];
bool check1() {
  for (int i = 1; i <= n - k + 1; i++) {
    int val = s[i - 1] + s[n] - s[i + k - 1];
    if (!val || val == n - k) return 1;
  }
  return 0;
}
bool check2() {
  if (k * 2 < n || k == 1) return 0;
  int mx = n - k - 1;
  for (int i = 2; i <= mx; i++)
    if (a[i] != a[i - 1] || a[n - i + 1] != a[n - i + 2]) return 0;
  if (a[mx] == a[mx + 1] || a[n - mx] == a[n - mx + 1] || a[1] == a[n])
    return 0;
  return 1;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) scanf("%1d", &a[i]), s[i] = s[i - 1] + a[i];
  if (check1())
    printf("tokitsukaze");
  else if (check2())
    printf("quailty");
  else
    printf("once again");
  return 0;
}
