#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
string P2 = "quailty";
string P1 = "tokitsukaze";
string DRAW = "once again";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int f0 = n;
  int f1 = n;
  int l0 = -1;
  int l1 = -1;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      f0 = min(i, f0);
      l0 = max(i, l0);
    } else {
      f1 = min(i, f1);
      l1 = max(i, l1);
    }
  }
  if (l0 == -1 || l1 == -1) {
    cout << P1 << endl;
    return 0;
  }
  if (l0 - f0 < k || l1 - f1 < k) {
    cout << P1 << endl;
    return 0;
  }
  vi next0(n, n);
  vi next1(n, n);
  vi prev0(n, -1);
  vi prev1(n, -1);
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      prev0[i] = i;
      if (i > 0) prev1[i] = prev1[i - 1];
    } else {
      prev1[i] = i;
      if (i > 0) prev0[i] = prev0[i - 1];
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '0') {
      next0[i] = i;
      if (i + 1 < n) next1[i] = next1[i + 1];
    } else {
      next1[i] = i;
      if (i + 1 < n) next0[i] = next0[i + 1];
    }
  }
  int w_st = 0;
  int w_end = k;
  while (w_end <= n) {
    bool good = false;
    int pref_w0 = -1;
    int pref_w1 = -1;
    if (w_st > 0) {
      if (prev0[w_st - 1] != -1) {
        pref_w0 = prev0[w_st - 1] - next0[0];
      }
      if (prev1[w_st - 1] != -1) {
        pref_w1 = prev1[w_st - 1] - next1[0];
      }
    }
    int suff_w0 = -1;
    int suff_w1 = -1;
    if (w_end < n) {
      if (next0[w_end] != -1) {
        suff_w0 = prev0[n - 1] - next0[w_end];
      }
      if (next1[w_end] != -1) {
        suff_w1 = prev1[n - 1] - next1[w_end];
      }
    }
    if (pref_w0 < k && suff_w0 == -1) good = true;
    if (pref_w1 < k && suff_w1 == -1) good = true;
    if (pref_w0 == -1 && suff_w0 < k) good = true;
    if (pref_w1 == -1 && suff_w1 < k) good = true;
    if (!good) {
      cout << DRAW << endl;
      return 0;
    }
    w_st++;
    w_end++;
  }
  cout << P2 << endl;
  return 0;
}
