#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(T x) {
  return x * x;
}
inline unsigned long long bit(int num) { return 1ull << num; }
long long FindXor(long long r) {
  long long rem = r % 4;
  switch (rem) {
    case 0:
      return r;
    case 1:
      return 1;
    case 2:
      return r + 1;
    case 3:
      return 0;
  }
}
long long FindXor(long long l, long long r) {
  return FindXor(r) ^ FindXor(l - 1);
}
int main() {
  int n;
  cin >> n;
  long long res = 0;
  for (int i = 0; i < int(n); ++i) {
    long long x, m;
    cin >> x >> m;
    res ^= FindXor(x, x + m - 1);
  }
  cout << (res ? "tolik" : "bolik") << endl;
  return 0;
}
