#include <bits/stdc++.h>
using namespace std;
int n, k;
int L[2] = {200005, 200005}, R[2] = {-1, -1};
char s[100005];
int main() {
  scanf("%d%d %s", &n, &k, s);
  for (int i = 0; i < n; ++i) {
    L[s[i] - '0'] = min(L[s[i] - '0'], i);
    R[s[i] - '0'] = max(R[s[i] - '0'], i);
  }
  for (int t = 0; t < 2; ++t) {
    if (R[t] - L[t] + 1 <= k) {
      printf("tokitsukaze\n");
      return 0;
    }
  }
  if (2 * k < n) {
    printf("once again\n");
    return 0;
  }
  char lft = s[0], rt = s[n - 1];
  if (lft != rt) {
    bool losing = true;
    for (int i = 0; i < n - k - 1; ++i) {
      if (!(s[i] == lft && s[n - 1 - i] == rt)) {
        losing = false;
      }
    }
    if (losing) {
      printf("quailty\n");
      return 0;
    }
  }
  printf("once again\n");
}
