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