#include <bits/stdc++.h>
using namespace std;
long long getAns(long long n) {
  if (n < 2) return n;
  if (n == 2) return 3;
  long long ret = 0, l, m;
  for (int i = 60; i >= 0; i--) {
    m = 1LL << i;
    if (m <= n) break;
  }
  if (n == m * 2 - 1) return 0;
  if ((n - m) % 2 == 0) ret ^= m;
  return ret ^ getAns(n - m);
}
int main() {
  long long n, x, m;
  long long ans = 0;
  cin >> n;
  while (n--) {
    cin >> x >> m;
    ans ^= getAns(x - 1) ^ getAns(x + m - 1);
  }
  puts(ans ? "tolik" : "bolik");
  return 0;
}
