#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 9;
const long long maxn = 2e5 + 100;
const long long mod = 998244353;
const long double eps = 1e-10;
long long n;
int mex(vector<int> a) {
  set<int> b(a.begin(), a.end());
  for (int i = 0;; ++i)
    if (!b.count(i)) return i;
}
int f(long long x) {
  if (x % 4 == 0) return x;
  if (x % 4 == 1) return 1;
  if (x % 4 == 2) return x + 1;
  return 0;
}
void solve() {
  cin >> n;
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    long long x, m;
    cin >> x >> m;
    res ^= f(x + m - 1) ^ f(x - 1);
  }
  if (res != 0)
    cout << "tolik\n";
  else
    cout << "bolik\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  for (int i = 1; i <= t; ++i) {
    solve();
  }
}
