#include <bits/stdc++.h>
using namespace std;
long long make(long long n) {
  if (n % 4 == 3) return 0;
  if (n % 4 == 0) return n;
  if (n % 4 == 1) return 1;
  if (n % 4 == 2) return (n ^ 1);
}
int main() {
  long long n;
  cin >> n;
  long long i, nim = 0;
  for (i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    nim ^= (make(a - 1) ^ make(a + b - 1));
  }
  if (nim != 0)
    cout << "tolik";
  else
    cout << "bolik";
}
