#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vpii = vector<pii>;
using vpll = vector<pll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using vvpii = vector<vpii>;
using vvpll = vector<vpll>;
using dd = double;
using ldd = long double;
using vd = vector<dd>;
inline void IO() {
  fclose(stderr);
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << setiosflags(ios::fixed) << setprecision(15);
  cerr << setiosflags(ios::fixed) << setprecision(15);
}
const ll MOD = 1e9 + 7;
const int INF = 2e9;
const ll INF64 = 9e18;
const dd PI = 3.1415926535897932;
int main() {
  IO();
  ll N;
  cin >> N;
  ll sum = 0;
  for (ll i = (0); i < (N); ++i) {
    ll x, m;
    cin >> x >> m;
    ll a = x + m - 1;
    ll b = x - 1;
    if (a % 4 == 0) sum ^= a;
    if (a % 4 == 1) sum ^= 1;
    if (a % 4 == 2) sum ^= a ^ 1;
    if (b % 4 == 0) sum ^= b;
    if (b % 4 == 1) sum ^= 1;
    if (b % 4 == 2) sum ^= b ^ 1;
  };
  if (sum)
    cout << "tolik\n";
  else
    cout << "bolik\n";
  ;
  return 0;
}
