#include <bits/stdc++.h>
using namespace std;
long long A[55];
long long n;
long long B[100005];
long long C[100005];
void init() {
  A[0] = 1;
  for (long long i = 1; i <= 54; i++) {
    A[i] = 2 * A[i - 1];
  }
}
signed main() {
  init();
  scanf("%lld", &(n));
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &(B[i]));
    scanf("%lld", &(C[i]));
    C[i] = B[i] + C[i] - 1;
    if (C[i] - B[i] <= 20) {
      for (long long j = B[i]; j <= C[i]; j++) {
        ans ^= j;
      }
    } else {
      for (long long j = 0; B[i] + j <= C[i] && j <= 4; j++) {
        if ((B[i] + j) % 4 == 0) {
          break;
        } else
          ans ^= (B[i] + j);
      }
      for (long long j = 0; B[i] <= C[i] - j && j <= 4; j++) {
        if ((C[i] - j) % 4 == 0) {
          ans ^= (C[i] - j);
          break;
        } else
          ans ^= (C[i] - j);
      }
    }
  }
  cout << (ans == 0 ? "bolik" : "tolik") << '\n';
}
