#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long n;
long long f(long long t) {
  long long now = 0, ts = 1, ans = 0;
  long long d = t % 4;
  if (d == 1 || d == 2) ans = 1;
  ts = 2;
  while (ts <= t) {
    now = 0;
    long long d = t - ts + 1;
    d = d % (ts * 2);
    if (d <= ts && d % 2) now = 1;
    ans += now * ts;
    ts *= 2;
  }
  return ans;
}
int main() {
  n = read();
  long long now = 0;
  for (long long i = (1); i <= (n); ++i) {
    long long x = read(), k = read();
    now ^= f(x - 1) ^ f(x + k - 1);
  }
  if (now)
    printf("tolik\n");
  else
    printf("bolik\n");
  return 0;
}
