#include <bits/stdc++.h>
using namespace std;
bool control(bitset<100005>& a, int n, int k) {
  int one = a.count(), c = 0;
  for (int i = 0; i < k; i++) {
    if (a[i]) c++;
  }
  if ((one - c == n - k) || (one - c == 0)) {
    return true;
  }
  for (int i = 1; i + k - 1 < n; i++) {
    if (a[i - 1]) c--;
    if (a[i + k - 1]) c++;
    if ((one - c == n - k) || (one - c == 0)) return true;
  }
  return false;
}
bool control2(bitset<100005>& a, int n, int k) {
  int q = a[0], w = a[n - 1], c = 0, d = 0;
  if (q == w) return false;
  for (int i = 0; i < n; i++) {
    if (a[i] != q) break;
    c++;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] != w) break;
    d++;
  }
  if (2 * k < n) return false;
  for (int i = 1; i <= c; i++) {
    if (i + k + d < n) return false;
  }
  for (int i = 1; i <= d; i++) {
    if (i + k + c < n) return false;
  }
  return true;
}
int main() {
  int n, k;
  bitset<100005> a;
  cin >> n >> k >> a;
  if (control(a, n, k)) {
    cout << "tokitsukaze";
    exit(0);
  }
  if (control2(a, n, k)) {
    cout << "quailty";
    exit(0);
  }
  cout << "once again";
}
