#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
const int MOD = 1000000007;
const int MOD1 = 998244353;
const int maxn = 100010;
const int lim = (int)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 0;
  lli x = 0ll, m = 0ll, res = 0ll;
  cin >> n;
  auto fun = [&](lli y) {
    lli r = y % 4;
    if (r == 0ll)
      return 0ll;
    else if (r == 1ll)
      return y - 1ll;
    else if (r == 2ll)
      return 1ll;
    else
      return y;
  };
  for (int i = 0; i < n; ++i) {
    cin >> x >> m;
    res ^= fun(x) ^ fun(x + m);
  }
  cout << (res == 0ll ? "bolik" : "tolik");
}
