#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define x first
#define y second
#define bg begin()
#define ed end()
#define pb push_back
#define mp make_pair
#define sz(a) int((a).size())
#define R(i,n) for(int i(0);i<(n);++i)
#define L(i,n) for(int i((n)-1);i>=0;--i)
const int iinf=0x3f3f3f3f;
const ll linf=0x3f3f3f3f3f3f3f3f;
//Data
const int N=1e5;
int n;
ll pre(ll x){
ll res=0;
R(i,x&3) res^=(x-1-i);
return res;
}
//Main
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
cin>>n;
// R(i,9) cout<<pre(i)<<'\n';
ll ns=0;
R(i,n){
ll x,m; cin>>x>>m;
ns^=pre(x)^pre(x+m);
}
if(ns) cout<<"tolik\n";
else cout<<"bolik\n";
return 0;
}