#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
long long solve(long long x) {
  long long res = 0;
  switch (x % 4) {
    case 0:
      res = x;
      break;
    case 1:
      res = 1;
      break;
    case 2:
      res = x + 1;
      break;
    case 3:
      res = 0;
      break;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  long long ans = 0;
  while (n--) {
    long long x, m;
    cin >> x >> m;
    long long l = x, r = x + m - 1;
    ans ^= solve(r) ^ solve(l - 1);
  }
  puts(ans ? "tolik" : "bolik");
}
