#include <bits/stdc++.h>
using namespace std;
struct shitClass {};
template <class T>
shitClass& operator<<(shitClass& c1, const T&) {
  return c1;
};
shitClass cerr1;
ostream& operator<<(ostream& os, const vector<long long>& a) {
  for (int i = 0; i < a.size(); i++) os << a[i] << " ";
  return os;
}
ostream& operator<<(ostream& os, const pair<long long, long long>& a) {
  os << a.first << " " << a.second;
  return os;
}
ostream& operator<<(ostream& os, const vector<int>& a) {
  for (int i = 0; i < a.size(); i++) os << a[i] << " ";
  return os;
}
istream& operator>>(istream& is, pair<long long, long long>& a) {
  is >> a.first >> a.second;
  return is;
}
struct Point {
  long long x = 0, y = 0;
};
istream& operator>>(istream& is, Point& a) {
  is >> a.x >> a.y;
  return is;
}
long long n, k;
bool check(pair<long long, long long> cur, int i, vector<long long>& pos) {
  if (cur.first >= i && cur.first <= i + k - 1) {
    auto newF = lower_bound(pos.begin(), pos.end(), i + k);
    if (newF == pos.end())
      cur.first = (long long)(1e9 + 10);
    else
      cur.first = *newF;
  } else if (cur.second >= i && cur.second <= i + k - 1) {
    auto newS = lower_bound(pos.begin(), pos.end(), i);
    if (newS == pos.begin())
      cur.second = -(long long)(1e9 + 10);
    else
      cur.second = *(--newS);
  }
  if (cur.first != (long long)(1e9 + 10) && (cur.second - cur.first) >= k)
    return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  pair<long long, long long> zer, one;
  vector<long long> zeroPos, onePos;
  string a;
  cin >> a;
  zer = {(long long)(1e9 + 10), -(long long)(1e9 + 10)};
  one = {(long long)(1e9 + 10), -(long long)(1e9 + 10)};
  for (long long i = 0; i < n; i++) {
    if (a[i] == '0') {
      zer.first = min(zer.first, i);
      zer.second = max(zer.second, i);
      zeroPos.push_back(i);
    } else {
      one.first = min(one.first, i);
      one.second = max(one.second, i);
      onePos.push_back(i);
    }
  }
  bool flag = 1;
  if (zer.first == (long long)(1e9 + 10) || (zer.second - zer.first) < k) {
    cout << "tokitsukaze" << '\n';
    return 0;
  }
  if (one.first == (long long)(1e9 + 10) || (one.second - one.first) < k) {
    cout << "tokitsukaze" << '\n';
    return 0;
  }
  flag = 1;
  for (int i = 0; i < n - k + 1; i++) {
    flag &= check(zer, i, zeroPos);
    flag &= check(one, i, onePos);
  }
  if (flag)
    cout << "quailty" << '\n';
  else
    cout << "once again" << '\n';
  return 0;
}
