#include <bits/stdc++.h>
using namespace std;
long long doxor(long long n) {
  switch (n % 4) {
    case 0:
      return n;
    case 1:
      return 1;
    case 2:
      return n + 1;
    case 3:
      return 0;
  }
}
long long solve_single(long long m, long long x) {
  return doxor(m + x - 1) ^ doxor(x - 1);
}
int main() {
  long long n;
  while (cin >> n) {
    long long res = 0;
    for (int i = 0; i < n; ++i) {
      long long m, x;
      cin >> x >> m;
      res ^= solve_single(m, x);
    }
    if (res != 0)
      cout << "tolik" << endl;
    else
      cout << "bolik" << endl;
  }
}
