#include <bits/stdc++.h>
using namespace std;
unsigned long long solve(unsigned long long x, unsigned long long y) {
  unsigned long long k, a, b, nim = 0, i;
  if (x < 4 && y < 4) {
    for (i = x; i <= y; i++) nim ^= i;
    return nim;
  } else if (x < 4) {
    for (i = x; i < 4; i++) nim ^= i;
    x = 4;
  }
  if (x == y) {
    nim ^= x;
    return nim;
  }
  k = 1;
  while (k < x) k <<= 1;
  if (k != x) {
    a = k - 1;
    k >>= 1;
    if ((a - x + 1) & 1) nim ^= k;
    nim ^= solve(x ^ k, a ^ k);
  }
  k = ((unsigned long long)1) << 61;
  while (k > y) k >>= 1;
  if (y == k)
    nim ^= y;
  else if ((k << 1) - 1 != y) {
    if ((y - k + 1) & 1) nim ^= k;
    nim ^= solve(1, y ^ k);
  }
  return nim;
}
int main(void) {
  unsigned long long x, y, m, nim;
  int n, i;
  scanf("%d", &n);
  nim = 0;
  for (i = 0; i < n; i++) {
    cin >> x >> m;
    y = x + m - 1;
    nim ^= solve(x, y);
  }
  if (nim)
    printf("tolik\n");
  else
    printf("bolik\n");
  return 0;
}
