#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= c == '-';
  for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
  x = f ? -x : x;
}
template <class T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  T y = 1;
  int len = 1;
  for (; y <= x / 10; y *= 10) ++len;
  for (; len; --len, x %= y, y /= 10) putchar(x / y + 48);
}
int n;
long long ans;
inline 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() {
  read(n);
  for (int i = 1; i <= n; ++i) {
    long long x, m, l, r;
    read(x), read(m);
    l = x, r = x + m - 1;
    ans ^= solve(r) ^ solve(l - 1);
  }
  puts(ans ? "tolik" : "bolik");
  return 0;
}
