#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
long long Solve(long long x) {
  long long t = x & 3;
  if (t & 1) return t / (long long)2 ^ (long long)1;
  return t / (long long)2 ^ x;
}
int main() {
  long long N, M, X;
  long long ans = 0;
  cin >> N;
  while (N--) {
    cin >> X >> M;
    ans ^= (Solve(X + M - 1) ^ (Solve(X - 1)));
  }
  if (ans)
    puts("tolik");
  else
    puts("bolik");
  return 0;
}
