#include <bits/stdc++.h>
using namespace std;
long long int n;
long long int a[100000 + 10], b[100000 + 10];
int main(int argc, char const *argv[]) {
  while (~scanf("%I64d", &n)) {
    long long int ans = 0;
    for (long long int i = 1; i <= n; i++) {
      scanf("%I64d%I64d", &a[i], &b[i]);
      long long int ed = a[i] + b[i] - 1;
      if (a[i] & 1) {
        ans ^= a[i];
        a[i]++, b[i]--;
      }
      if (b[i]) {
        long long int siz = b[i] >> 1;
        if (siz & 1) ans ^= 1;
        if (b[i] & 1) ans ^= ed;
      }
    }
    ans ? puts("tolik") : puts("bolik");
  }
  return 0;
}
