#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC optimize("inline")
using namespace std;
long long n, a, b, ans;
inline long long qread() {
  register char ch = getchar();
  register long long v = 0;
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    v = v * 10 + ch - '0';
    ch = getchar();
  }
  return v;
}
int main() {
  n = qread();
  while (n--) {
    a = qread();
    b = qread();
    if (a & 1) {
      --b;
      ans ^= a;
      ++a;
    }
    if (b && (b & 1)) {
      --b;
      ans ^= a + b;
    }
    if (b && (b / 2) & 1) {
      ans ^= 1;
    }
  }
  if (ans)
    puts("tolik");
  else
    puts("bolik");
  return 0;
}
