#include <bits/stdc++.h>
using namespace std;
long long XOR(long long x) {
  long long ret = 0, t, tmp, a;
  for (int i = 1; i < 64; i++)
    if (x >= (1LL << (i - 1))) {
      a = x - (1LL << (i - 1)) + 1;
      t = (a / (1LL << i)) * (1LL << (i - 1));
      tmp = (a - (a / (1LL << i)) * (1LL << i));
      if (tmp > (1LL << (i - 1))) tmp = (1LL << (i - 1));
      t += tmp;
      ret ^= (long long)(t % 2) << (i - 1);
    } else
      break;
  return ret;
}
long long solve(long long s, long long t) {
  long long ret = XOR(s - 1);
  ret ^= XOR(t);
  return ret;
}
int main() {
  int n;
  long long s, t;
  while (scanf("%d", &n) != EOF) {
    long long ans = 0;
    for (int i = 1; i <= n; i++) {
      cin >> s >> t;
      ans ^= solve(s, s + t - 1);
    }
    printf("%s\n", ans ? "tolik" : "bolik");
  }
  return 0;
}
