#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, ans = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long x, m;
    cin >> x >> m;
    for (long long j = 1; j <= 1e16; j *= 2) {
      long long A = (x + m - 1) / (j * 2) * j;
      long long B = max(0LL, (x + m - 1) % (j * 2) - j + 1);
      long long C = (x - 1) / (j * 2) * j;
      long long D = max(0LL, (x - 1) % (j * 2) - j + 1);
      ans ^= ((A + B - C - D) % 2) * j;
    }
  }
  if (ans == 0)
    cout << "bolik";
  else
    cout << "tolik";
  return 0;
}
