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
import java.io.*;
import java.lang.reflect.Array;
import java.security.cert.TrustAnchor;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {


    private static final int MXLG = 55;
    private static boolean [] str ;

    private static void bin(long num){
        str = new boolean[MXLG];
        for (int i = MXLG - 1;i >= 0;i--){
            if((num & 1) != 0) str[i] = true;
            else str[i] = false;
            num >>= 1;
        }
    }


    private static long evalBit(int target_bit){
        long ret = 0;
        int bit = 0;
        for (;bit < target_bit;bit++){
            if(str[bit]) ret += (1L << (MXLG - bit - 1)) >> 1;
        }
        if(str[bit]) {
            long tmp = 0;
            for (int b = bit + 1; b < MXLG; b++)
                tmp = (tmp << 1) | (str[b] ? 1 : 0);
            tmp++;
            ret += tmp;
        }
        return ret;
    }
    private static long eval(long num){
        long t = 0;
        bin(num);
        long [] cnt = new long[MXLG];
        for (int bit = 0;bit < MXLG;bit++) {
            if(str[MXLG - 1 - bit]){
                long msk = (1L << bit) - 1;
                cnt[MXLG - 1 - bit] = (msk & num) + 1;
            }
        }
        long ctr = 0;
        for (int bit = 0;bit < MXLG;bit++){
            cnt[bit] += ctr;
            if(str[bit]) ctr +=  (1L << (MXLG - bit - 1)) >> 1;
            if (cnt[bit]%2 == 1) t |= 1L << (MXLG - 1 - bit);
        }
        return t;
    }
    private static int bf(int x,int m){
        int r = 0;
        for (int i = 0;i < m;i++)
            r ^= x + i;
        return r;
    }
    private static long get_val(long x,long m){
        long t = eval(x + m - 1);
        t ^= eval(x - 1);
        return  t;
    }
    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        long t = 0;
        String [] name = {"bolik","tolik"};
        for (int i = 0;i < n;i++){
            long x = io.getNextLong(),m = io.getNextLong();
            t ^= get_val(x,m);
        }
        if(t != 0) t = 1;

        io.println(name[(int)t]);

/*       for (int x = 1;x <= 10;x++)
            for (int m = 1;m <= 10;m++)
               if(bf(x,m) != get_val(x,m))
                    System.err.println(x + " " + m);
*/
        io.close();
    }
}




class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

