There are n stone quarries in Petrograd.

Each quarry owns mi dumpers (1 ≤ i ≤ n). It is known that the first dumper of the i-th quarry has xi stones in it, the second dumper has xi + 1 stones in it, the third has xi + 2, and the mi-th dumper (the last for the i-th quarry) has xi + mi - 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 ≤ 105) — the amount of quarries. Then there follow n lines, each of them contains two space-separated integers xi and mi (1 ≤ xi, mi ≤ 1016) — 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
// Don't place your source in a package
import javax.swing.*;
import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;



// Please name your class Main
public class Main {
    static FastScanner fs=new FastScanner();
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next() {
            while (!st.hasMoreElements())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        int Int() {
            return Integer.parseInt(next());
        }

        long Long() {
            return Long.parseLong(next());
        }

        String Str(){
            return next();
        }
    }


    public static void main (String[] args) throws java.lang.Exception {
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        //reading /writing file
        //Scanner sc=new Scanner(new File("input.txt"));
        //PrintWriter pr=new PrintWriter("output.txt");


        int T=1;
        for(int t=0;t<T;t++){
            int n=Int();
            long A[][]=new long[n][2];
            for(int i=0;i<n;i++){
                A[i][0]=Long();
                A[i][1]=Long();
            }

            Solution sol=new Solution(out);
            sol.solution(A);
        }
        out.close();

    }

    public static int[] Arr(int n){
        int A[]=new int[n];
        for(int i=0;i<n;i++)A[i]=Int();
        return A;
    }
    public static int Int(){
        return fs.Int();
    }
    public static long Long(){
        return fs.Long();
    }
    public static String Str(){
        return fs.Str();
    }

}








class Solution{
    PrintWriter out;
    int INF=Integer.MAX_VALUE;
    public Solution(PrintWriter out){
        this.out=out;
    }


    String a="tolik";
    String b="bolik";
    public void solution(long A[][]){


        long res=0;
        for(int i=0;i<A.length;i++){
            long p[]=A[i];
            long l=p[0],r=l+p[1]-1;
            long xor=0;
            long base=1;
            for(int j=0;j<62;j++){
                base*=2;
                long cnt=cal((1l<<j),r,base)-cal((1l<<j),l-1,base);
                if(cnt%2==1){
                    xor=xor|(1l<<j);
                }
            }
           // System.out.println(xor);
            res=res^xor;
        }




        if(res==0){
            out.println(b);
        }
        else{
            out.println(a);
        }

    }

    public long cal(long start,long hi,long base){
        long cnt=hi-start+1;
        if(cnt<0)return 0;

        long block=cnt/base;
        long mod=cnt%base;
        long half=base/2;

        long res=0;
        res+=(half)*block;
        if(mod!=0){
            if(half>=mod)res+=mod;
            else res+=half;
        }

        return res;
    }

}


/*
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
*/
