#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)(1e9 + 7);
long long modpow(long long a, long long b) {
  if (!b) return 1;
  a %= mod;
  return modpow(a * a % mod, b / 2) * (b & 1 ? a : 1) % mod;
}
long long getbase(long long a, int base) {
  long long b = 1LL << base;
  return 1LL * ((a + 1) / (2 * b) * b) + max(0LL, ((a + 1) % (2 * b) - b));
}
vector<long long> decompose(long long a, long long b) {
  vector<long long> basis;
  for (int base = 0; base <= 54; base++)
    basis.push_back(getbase(b, base) - getbase(a, base));
  return basis;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  scanf("%d", &t);
  stringstream ss;
  vector<long long> ans(55, 0);
  for (int i = 0; i < t; i++) {
    long long x, m;
    scanf("%lld%lld", &x, &m);
    vector<long long> newvec = decompose(x - 1, x + m - 1);
    for (int base = 0; base < 55; base++)
      ans[base] = (ans[base] + newvec[base]) % 2;
  }
  for (int i = 0; i < 55; i++)
    if (ans[i] % 2) {
      cout << "tolik" << endl;
      exit(0);
    }
  cout << "bolik" << endl;
  return 0;
}
