#include <bits/stdc++.h>
using namespace std;
int n;
long long s = 0;
long long f(long long x) {
  int r = x % 4;
  if (r == 1) return 1LL;
  if (r == 2) return x + 1;
  if (r == 3) return 0LL;
  return x;
}
int main() {
  cin >> n;
  while (n--) {
    long long x, m;
    cin >> x >> m;
    s ^= f(x - 1) ^ f(x + m - 1);
  }
  if (s != 0)
    cout << "tolik\n";
  else
    cout << "bolik\n";
  return 0;
}
