#include <bits/stdc++.h>
using namespace std;
long long xs(long long to) {
  to++;
  long long num = 0;
  for (long long i = 1; (1 > 54 ? -1 : 1) * i <= (1 > 54 ? -1 : 1) * 54;
       i += (1 > 54 ? -1 : 1))
    num += ((long long)1 << (i - 1)) *
           ((to / ((long long)1 << i) * ((long long)1 << (i - 1)) +
             max((to % ((long long)1 << i)) - ((long long)1 << (i - 1)),
                 (long long)0)) %
            (long long)2);
  return num;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, tot = 0;
  cin >> n;
  while (n--) {
    long long x, m;
    cin >> x >> m;
    tot ^= (xs(x + m - 1) ^ xs(x - 1));
  }
  cout << (tot ? "tolik" : "bolik") << "\n";
  return 0;
}
