#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
long long SG(long long n) {
  switch (n % 4) {
    case 0:
      return n;
    case 1:
      return 1;
    case 2:
      return n + 1;
    case 3:
      return 0;
  }
}
int N, M;
int main() {
  long long ans;
  long long x, m;
  while (~scanf("%d", &N)) {
    ans = 0;
    while (N--) {
      scanf("%I64d%I64d", &x, &m);
      ans ^= SG(x + m - 1) ^ SG(x - 1);
    }
    printf("%s\n", ans ? "tolik" : "bolik");
  }
  return 0;
}
