#include <bits/stdc++.h>
using namespace std;
long long f(long long x) {
  long long res = 0;
  for (int i = 0; (1LL << i) <= x; i++) {
    long long b = 1LL << i;
    long long t1 = x / (b * 2) * b;
    long long t2 = max(0LL, x % (b * 2) - b);
    long long t = (t1 + t2) % 2;
    res |= (t << i);
  }
  return res;
}
int main() {
  int N;
  while (1 == scanf("%d", &N)) {
    long long x = 0;
    for (int i = 0; i < (int)(N); i++) {
      long long a, b;
      cin >> a >> b;
      x ^= f(a) ^ f(a + b);
    }
    if (x)
      puts("tolik");
    else
      puts("bolik");
  }
  return 0;
}
