#include <bits/stdc++.h>
using namespace std;
int n, num[110];
int calc(long long n) {
  int tot = 0;
  long long ans = 0;
  for (long long tmp = n; tmp; tmp >>= 1LL) num[++tot] = tmp & 1LL;
  num[tot + 1] = 0;
  for (int i = tot; i >= 1; i--) {
    int tmp = 0;
    if (i == 1) tmp = num[i + 1];
    if (num[i] == 1) {
      if (i > 1)
        tmp ^= (num[1] ^ 1);
      else
        tmp ^= 1;
    }
    if (tmp) ans |= (1LL << (i - 1));
  }
  return ans;
}
int main() {
  while (~scanf("%d", &n)) {
    long long x, m;
    long long ans = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%I64d%I64d", &x, &m);
      ans ^= calc(x + m - 1) ^ calc(x - 1);
    }
    if (ans)
      puts("tolik");
    else
      puts("bolik");
  }
}
