#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long double EPS = 1e-9;
const long double PI = acos(-1);
const long long INF = 1e18;
const long long mod = 1e9 + 7;
long long xor_1_x(long long x) {
  if (x % 4 == 0) return x;
  if (x % 4 == 1) return 1;
  if (x % 4 == 2) return x + 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test_cases = 1;
  while (test_cases--) {
    int n;
    cin >> n;
    long long s = 0, x, m;
    while (n--) {
      cin >> x >> m;
      s ^= (xor_1_x(x - 1) ^ xor_1_x(x + m - 1));
    }
    if (s)
      cout << "tolik";
    else
      cout << "bolik";
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
