#include <bits/stdc++.h>
long long m[200000];
long long x[200000];
long long totfind(long long x, long long pos) {
  int modval = x & ((1 << (pos + 1)) - 1);
  long long retval = (x / (1 << (pos + 1))) * (1 << pos);
  if (modval < (1 << pos)) {
    return retval;
  } else {
    return retval + (modval - (1 << pos) + 1);
  }
}
long long totfindbrute(long long upto, int pos) {
  long long retval = 0;
  for (int i = 0; i <= upto; i++) {
    retval += (i >> pos) & 1;
  }
  return retval;
}
int main() {
  int n;
  scanf("%d", &n);
  long long nimsum[22];
  for (int i = 0; i <= 20; i++) nimsum[i] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld %lld", &x[i], &m[i]);
    for (int j = 0; j <= 19; j++) {
      nimsum[j] =
          (nimsum[j] + totfind(x[i] + m[i] - 1, j) - totfind(x[i] - 1, j)) % 2;
    }
  }
  bool ok = 1;
  for (int j = 0; j <= 19; j++)
    if (nimsum[j] != 0) {
      ok = 0;
      break;
    }
  if (ok)
    printf("bolik\n");
  else
    printf("tolik\n");
}
