#include <bits/stdc++.h>
using namespace std;
template <typename T>
string to_string(const vector<T>& vc, int w) {
  if (vc.empty()) return "";
  if (w + 1 == vc.size()) return to_string(vc[w]);
  return to_string(vc[w]) + "," + to_string(vc, w + 1);
}
template <typename T>
string to_string(const vector<T>& vc) {
  return "{" + to_string(vc, 0) + "}";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
class DebugStream {
} LOG;
template <typename T>
DebugStream& operator<<(DebugStream& s, const T&) {
  return s;
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 1e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  string str;
  cin >> n >> k >> str;
  if (str == string(n, str[0])) {
    cout << "tokitsukaze\n";
    return 0;
  }
  vector<int> a, b;
  for (int i = 0; i < n; i++) (str[i] == '0' ? a : b).push_back(i);
  int uno = a.back() - a[0] + 1, dos = b.back() - b[0] + 1;
  if (min(uno, dos) <= k) {
    cout << "tokitsukaze\n";
    return 0;
  }
  if (max(uno, dos) >= k + 2 ||
      string(k + 1, str[0]) + string(k + 1, str.back()) == str) {
    cout << "once again\n";
    return 0;
  }
  cout << "quailty\n";
}
