#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  long long x, m, y, ans = 0, val1, val2;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld", &x);
    scanf("%lld", &m);
    y = x + m - 1;
    x--;
    if (x % 4 == 0)
      val1 = x;
    else if (x % 4 == 1)
      val1 = 1;
    else if (x % 4 == 2)
      val1 = x + 1;
    else
      val1 = 0;
    if (y % 4 == 0)
      val2 = y;
    else if (y % 4 == 1)
      val2 = 1;
    else if (y % 4 == 2)
      val2 = y + 1;
    else
      val2 = 0;
    ans = ans ^ (val1 ^ val2);
  }
  if (ans == 0) {
    cout << "bolik\n";
  } else
    cout << "tolik\n";
  return 0;
}
