#include <bits/stdc++.h>
using namespace std;
const int WIN = 1;
const int LOSE = -1;
const int DRAW = 0;
bool canWinInFirstMove(int n, int k, string &s) {
  int sum = 0;
  for (int i = 0; i < n; i++) sum += s[i] - '0';
  int consider = 0;
  for (int i = 0; i < k; i++) consider += s[i] - '0';
  const int remain = n - k;
  for (int stp = 0; stp + k - 1 < n; stp++) {
    int left = sum - consider;
    if (left == 0 || left == remain) return true;
    if (stp + k >= n) return false;
    consider -= s[stp] - '0';
    consider += s[stp + k] - '0';
  }
  return false;
}
int getMin(set<int> &s) {
  set<int>::iterator it = s.begin();
  return *it;
}
int getMax(set<int> &s) {
  set<int>::iterator it = s.end();
  it--;
  return *it;
}
bool canAvoidLosing(int n, int k, string &s) {
  set<int> bank[2];
  for (int i = k; i < n; i++) bank[s[i] - '0'].insert(i);
  for (int stp = 0; stp + k - 1 < n; stp++) {
    int lowZero = getMin(bank[0]);
    int highZero = getMin(bank[0]);
    int lowOne = getMin(bank[1]);
    int highOne = getMax(bank[1]);
    if (highOne - lowOne >= k) {
      int nlz = min(lowZero, stp);
      int nhz = max(highZero, stp + k - 1);
      if (nhz - nlz >= k) return true;
    }
    if (highZero - lowZero >= k) {
      int nlo = min(lowOne, stp);
      int nho = max(highOne, stp + k - 1);
      if (nho - nlo >= k) return true;
    }
    if (stp + k >= n) return false;
    bank[s[stp] - '0'].insert(stp);
    bank[s[stp + k] - '0'].erase(stp + k);
  }
  return false;
}
int playGame(int n, int k, string &s) {
  if (canWinInFirstMove(n, k, s)) return WIN;
  if (canAvoidLosing(n, k, s)) return DRAW;
  return LOSE;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  string s;
  cin >> s;
  int result = playGame(n, k, s);
  if (result == WIN)
    printf("tokitsukaze\n");
  else if (result == LOSE)
    printf("quailty\n");
  else if (result == DRAW)
    printf("once again\n");
  return 0;
}
