#include <bits/stdc++.h>
long long t[60];
long long temp[60];
int n_t;
long long getn() {
  long long t = 0;
  int i;
  char s[100];
  scanf("%s", s);
  for (i = 0; s[i]; ++i) t = t * 10 + (long long)(s[i] - '0');
  return t;
}
void work(long long a, long long b, int k) {
  long long c;
  if (k <= 0) return;
  if (a == 0 && b == temp[k] * 2 - 1) {
    if (k == 1) ++t[k];
    return;
  }
  if (a <= temp[k] - 1) {
    c = b;
    if (temp[k] - 1 < c) c = temp[k] - 1;
    work(a, c, k - 1);
  }
  if (a < temp[k]) a = temp[k];
  if (b >= temp[k]) {
    t[k] = t[k] + b - a + 1;
    a -= temp[k];
    b -= temp[k];
    work(a, b, k - 1);
  }
}
int main() {
  int n, i, j;
  long long out;
  temp[1] = 1;
  for (i = 2; i < 60; ++i) temp[i] = temp[i - 1] * 2;
  long long a, b;
  n = (int)getn();
  for (i = 0; i < n; ++i) {
    a = getn();
    b = getn();
    work(a, b + a - 1, 60 - 1);
  }
  out = 0;
  for (i = 0; i < 60; ++i) {
    if (t[i] % 2 != 0) out = 1;
  }
  if (out == 1)
    printf("tolik\n");
  else
    printf("bolik\n");
  return 0;
}
