#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double Pi = acos(-1);
namespace {
template <typename T>
inline void read(T &x) {
  x = 0;
  T f = 1;
  char s = getchar();
  for (; !isdigit(s); s = getchar())
    if (s == '-') f = -1;
  for (; isdigit(s); s = getchar()) x = (x << 3) + (x << 1) + (s ^ 48);
  x *= f;
}
}  // namespace
long long fun(long long x) {
  switch (x % 4) {
    case 0:
      return x;
    case 1:
      return 1;
    case 2:
      return x + 1;
    case 3:
      return 0;
  }
}
int main() {
  int n;
  read(n);
  long long xi, mi;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    read(xi);
    read(mi);
    ans ^= fun(xi + mi - 1) ^ fun(xi - 1);
  }
  if (ans)
    cout << "tolik" << endl;
  else
    cout << "bolik" << endl;
}
