Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
C. Industrial Nim

time limit per test

2 secondsmemory limit per test

64 megabytesinput

standard inputoutput

standard outputThere are *n* stone quarries in Petrograd.

Each quarry owns *m*_{i} dumpers (1 ≤ *i* ≤ *n*). It is known that the first dumper of the *i*-th quarry has *x*_{i} stones in it, the second dumper has *x*_{i} + 1 stones in it, the third has *x*_{i} + 2, and the *m*_{i}-th dumper (the last for the *i*-th quarry) has *x*_{i} + *m*_{i} - 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».

Input

The first line of the input contains one integer number *n* (1 ≤ *n* ≤ 10^{5}) — the amount of quarries. Then there follow *n* lines, each of them contains two space-separated integers *x*_{i} and *m*_{i} (1 ≤ *x*_{i}, *m*_{i} ≤ 10^{16}) — the amount of stones in the first dumper of the *i*-th quarry and the number of dumpers at the *i*-th quarry.

Output

Output «tolik» if the oligarch who takes a stone first wins, and «bolik» otherwise.

Examples

Input

2

2 1

3 2

Output

tolik

Input

4

1 1

1 1

1 1

1 1

Output

bolik

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/04/2021 06:46:03 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|