#include <bits/stdc++.h>
using namespace std;
int findAns(long long int n, long long int k, string s, char c) {
  if (n <= k) return 1;
  long long int count = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == c) count++;
  }
  long long int loc = 0;
  for (long long int i = 0; i < k - 1; i++) {
    if (s[i] == c) loc++;
  }
  for (long long int i = k - 1; i < n; i++) {
    if (s[i] == c) loc++;
    if (loc == count) {
      return 1;
    }
    if (s[i - k + 1] == c) loc--;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  if (findAns(n, k, s, '0') == 1 || findAns(n, k, s, '1') == 1) {
    cout << "tokitsukaze" << endl;
    return 0;
  }
  string x = "";
  for (int i = k; i < n; i++) {
    x.push_back(s[i]);
  }
  if (findAns(n - k, k, x, '0') == 0 || findAns(n - k, k, x, '1') == 0) {
    cout << "once again" << endl;
    return 0;
  }
  x = "";
  for (int i = 0; i < n - k; i++) {
    x.push_back(s[i]);
  }
  if (findAns(n - k, k, x, '0') == 0 || findAns(n - k, k, x, '1') == 0) {
    cout << "once again" << endl;
    return 0;
  }
  char l = s[0];
  char r = '0';
  if (l == '0') r = '1';
  for (int i = k + 1; i < n; i++) {
    if (s[i] != r) {
      cout << "once again" << endl;
      return 0;
    }
  }
  for (int i = k + 2; i < n; i++) {
    if (s[i - k - 1] != l) {
      cout << "once again" << endl;
      return 0;
    }
  }
  cout << "quailty" << endl;
  return 0;
}
