#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
const ld pi = acos(0) * 2;
template <typename T>
inline void read(T &x) {
  char c;
  bool nega = 0;
  while ((!isdigit(c = getchar())) && (c != '-'))
    ;
  if (c == '-') {
    nega = 1;
    c = getchar();
  }
  x = c - 48;
  while (isdigit(c = getchar())) x = x * 10 + c - 48;
  if (nega) x = -x;
}
template <typename T>
inline void writep(T x) {
  if (x > 9) writep(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  writep(x);
}
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
template <typename CT, typename T>
inline void reset_container(CT &c, int sz, T v) {
  c.resize(sz);
  for (auto &x : c) x = v;
}
int n, k;
string s;
string t;
bool can_win() {
  int first[256];
  int last[256];
  first['0'] = last['0'] = -1;
  first['1'] = last['1'] = -1;
  for (int i = (0); i < (n); i++) last[s[i]] = i;
  for (int i = (n - 1); i >= (0); i--) first[s[i]] = i;
  if (last['0'] - first['0'] + 1 <= k) return 1;
  if (last['1'] - first['1'] + 1 <= k) return 1;
  return 0;
}
set<int> pos[256];
bool can_draw() {
  for (int i = (0); i < (n); i++) pos[s[i]].insert(i);
  for (int i = (0); i < (k); i++) pos[s[i]].erase(i);
  for (int i = (k - 1); i < (n); i++) {
    pos[s[i]].erase(i);
    if (*pos['0'].rbegin() - *pos['0'].begin() + 1 > k) return 1;
    if (*pos['1'].rbegin() - *pos['1'].begin() + 1 > k) return 1;
    pos[s[i - k + 1]].insert(i - k + 1);
  }
  return 0;
}
int main() {
  read(n);
  read(k);
  cin >> s;
  if (can_win()) {
    puts("tokitsukaze");
    return 0;
  } else if (can_draw()) {
    puts("once again");
  } else {
    puts("quailty");
  }
}
