#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, f;
  long long a = -1, b, x, y, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld %lld", &x, &y);
    b = x;
    f = 0;
    for (j = 1; j < y; j++) {
      if (f && (b == x || b == 0)) {
        j += (y - j - 1) / 4 * 4;
      }
      if (j < y) b ^= (x + j);
      f = 1;
    }
    if (a == -1)
      a = b;
    else
      a ^= b;
  }
  if (a)
    cout << "tolik" << endl;
  else
    cout << "bolik" << endl;
}
