#include <bits/stdc++.h>
using namespace std;
unsigned long long itn(unsigned long long x) {
  if (x == 0) return 0;
  if (x == 1) return 1;
  if (x == 2) return 3;
  if (x == 3) return 0;
  unsigned long long res = 0, j = 1;
  while (j <= x) j *= 2;
  j /= 2;
  if ((x - j + 1) % 2 == 1) res += j;
  return res + itn(x - j);
}
int main() {
  unsigned long long n, x, m, i, a, b, xo = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> m;
    a = itn(x - 1);
    b = itn(x + m - 1);
    a = a ^ b;
    xo = xo ^ a;
  }
  if (xo == 0)
    cout << "bolik";
  else
    cout << "tolik";
}
