There are *n* stone quarries in Petrograd.

Each quarry owns *m*<sub class="lower-index">*i*</sub> dumpers (1 ≤ *i* ≤ *n*). It is known that the first dumper of the *i*-th quarry has *x*<sub class="lower-index">*i*</sub> stones in it, the second dumper has *x*<sub class="lower-index">*i*</sub> + 1 stones in it, the third has *x*<sub class="lower-index">*i*</sub> + 2, and the *m*<sub class="lower-index">*i*</sub>-th dumper (the last for the *i*-th quarry) has *x*<sub class="lower-index">*i*</sub> + *m*<sub class="lower-index">*i*</sub> - 1 stones in it.

Two oligarchs play a well-known game Nim. Players take turns removing stones from dumpers. On each turn, a player can select any dumper and remove any non-zero amount of stones from it. The player who cannot take a stone loses.

Your task is to find out which oligarch will win, provided that both of them play optimally. The oligarchs asked you not to reveal their names. So, let's call the one who takes the first stone «tolik» and the other one «bolik».
The first line of the input contains one integer number *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the amount of quarries. Then there follow *n* lines, each of them contains two space-separated integers *x*<sub class="lower-index">*i*</sub> and *m*<sub class="lower-index">*i*</sub> (1 ≤ *x*<sub class="lower-index">*i*</sub>, *m*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">16</sup>) — the amount of stones in the first dumper of the *i*-th quarry and the number of dumpers at the *i*-th quarry.
2
2 1
3 2
tolik
4
1 1
1 1
1 1
1 1
bolik
10
2 3
1 4
5 8
4 10
10 8
7 2
1 2
1 7
4 10
5 3
tolik
20
8 6
6 3
2 9
7 8
9 1
2 4
3 6
6 3
5 6
5 3
6 5
2 10
2 9
6 3
10 6
10 10
10 7
3 9
16 1
1 3
bolik
30
53 12
13 98
21 60
76 58
39 5
62 58
73 80
13 75
37 45
44 86
1 85
13 33
17 50
12 26
97 48
52 40
2 71
95 79
38 76
24 54
91 39
97 92
94 80
50 61
33 56
22 91
39 94
31 56
28 16
20 44
tolik
1
3737203222172202 1
tolik
1
3737203222172202 1
tolik
I = lambda : map(int,input().split())
n = int(input())
su = 0 
for i in range (n) :
        x , y = I()
        if x%2 == 0 :
            if y%2 == 1 :
                if y%4 == 3 :
                    su+=1
            else :
                if y%4 == 2 :
                    su+=1
        else :
            if y%2 == 1 :
               if y%4 == 1 :
                   su+=1
            else :
               if y%4 ==2 :
                   su+=1
        #print(su)
if su%2 == 1 :
    print("tolik")
else :
    print("bolik")