#include <bits/stdc++.h>
using namespace std;
vector<string> strsp(string a, string delim = " ") {
  vector<string> ret;
  string cr = "";
  for (int i = 0; i < a.size(); i++) {
    if (delim.find(a[i]) == string::npos)
      cr += a[i];
    else {
      if (cr.size()) ret.push_back(cr);
      cr = "";
    }
  }
  if (cr.size()) ret.push_back(cr);
  return ret;
}
long long gcd(long long a, long long b) {
  long long tmp = 0;
  while (b != 0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}
int main() {
  int N;
  cin >> N;
  long long ret = 0, start, end;
  long long cr, bit, begin, cnt, tbit, finish;
  for (int i = 0; i < N; i++) {
    cin >> start >> end;
    end += start - 1;
    cr = 0;
    bit = 1;
    while (true) {
      tbit = bit * 2LL;
      if (bit > end) break;
      begin = start + (tbit - start % tbit) % tbit;
      finish = end - end % tbit;
      cnt = (finish - begin) / 2;
      cnt += min(tbit / 2LL, begin - start);
      cnt += max(0LL, end - tbit / 2LL - finish + 1);
      if (cnt % 2 == 1) cr += bit;
      bit = bit * (long long)2;
    }
    ret = ret ^ cr;
  }
  if (ret > 0)
    cout << "tolik\n";
  else
    cout << "bolik\n";
  return 0;
}
