#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d", &n);
  long long k = 0, x, m;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &x, &m);
    long long kk = 0, j = 2, l = 4, o, p;
    if (m % 2 == 1) {
      if (((x % 2) + (((m - 1) / 2) % 2)) % 2 == 1) kk += 1;
    }
    if (m % 2 == 0) {
      if ((m / 2) % 2 == 1) kk += 1;
    }
    while (x + m - 1 >= j) {
      o = m % l;
      if (o != 0) {
        long long temp = 0;
        o = x % l + 1;
        p = (m - (l - o + 1) - 1) % l + 1;
        if (p <= 0) {
          p += l;
          if ((o > j) && (p > j))
            o = p - o + 1;
          else if (p > j)
            o = p;
          else
            o = 0;
          temp = (o % 2 == 1);
        } else {
          temp = max(0LL, l - max(j, o));
          temp += max(0LL, p - j);
          if (o > j) temp += 1;
          temp %= 2;
        }
        kk += j * temp;
      }
      j *= 2;
      l *= 2;
    }
    k = k xor kk;
  }
  if (k)
    puts("tolik");
  else
    puts("bolik");
  return 0;
}
