#include <bits/stdc++.h>
using namespace std;
inline bool isvowel(char ch) {
  ch = tolower(ch);
  return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
          ch == 'y');
}
inline bool isprime(int n) {
  if (n < 2 || (n % 2 == 0 && n != 2)) return false;
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n, i;
  vector<long long> v;
  cin >> n;
  for (i = 0; i < n; i++) {
    long long x, m;
    cin >> x >> m;
    long long xx, mm;
    if ((x - 1) % 4 == 0)
      xx = x - 1;
    else if ((x - 1) % 4 == 1)
      xx = 1;
    else if ((x - 1) % 4 == 2)
      xx = x;
    else
      xx = 0;
    if ((x + m - 1) % 4 == 0)
      mm = x + m - 1;
    else if ((x + m - 1) % 4 == 1)
      mm = 1;
    else if ((x + m - 1) % 4 == 2)
      mm = m + x;
    else
      mm = 0;
    v.push_back((xx ^ mm));
  }
  for (i = 0; i < v.size() - 1; i++) {
    v[i + 1] = (v[i] ^ v[i + 1]);
  }
  if (v.back() == 0)
    cout << "bolik";
  else
    cout << "tolik";
  return 0;
}
