#include <bits/stdc++.h>
using namespace std;
long long get(long long x) {
  int xx = x % 4;
  if (xx == 2) return x + 1LL;
  if (xx == 0) return x;
  if (xx == 1) return 1LL;
  if (xx == 3) return 0;
}
int main() {
  int n;
  long long x, y, sum = 0;
  scanf("%d", &n);
  while (n--) {
    scanf("%lld%lld", &x, &y);
    long long xx = get(y + x - 1) ^ get(x - 1);
    sum ^= xx;
  }
  printf("%s\n", sum ? "tolik" : "bolik");
  return 0;
}
