#include <bits/stdc++.h>
using namespace std;
long long f(long long x) {
  if (x % 4 == 0) return x;
  if (x % 4 == 1) return 1;
  if (x % 4 == 2) return x + 1;
  if (x % 4 == 3) return 0;
}
signed main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long ans = 0;
  while (n--) {
    long long x, m;
    cin >> x >> m;
    ans ^= f(x + m - 1) ^ f(x - 1);
  }
  cout << (ans ? "tolik" : "bolik");
}
