#include <bits/stdc++.h>
using namespace std;
long long int fun(long long int x) {
  if (x % 4 == 0)
    return x;
  else if (x % 4 == 1)
    return 1;
  else if (x % 4 == 2)
    return x + 1;
  else
    return 0;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  long long int x, m;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> x >> m;
    ans ^= fun(x - 1) ^ fun(x + m - 1);
  }
  if (ans == 0)
    cout << "bolik" << endl;
  else
    cout << "tolik" << endl;
  return 0;
}
