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.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws FileNotFoundException, IOException {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		TaskB solver = new TaskB();
		long t1 = System.currentTimeMillis();
		solver.solve(1, in, out);
		out.flush();
		long t2 = System.currentTimeMillis();
//		System.err.println(t2 - t1);
		out.close();

	}
}

class Seg implements Comparable<Seg> {
	double a;
	double b;

	public Seg(double a, double b) {
		this.a = a;
		this.b = b;
	}

	public int compareTo(Seg t) {
		return Double.compare(a, t.a);
	}

}

class TaskB {

	int id[];
	int sz[];
	double eps = 1e-10;
	long INF = (long) 1e15;

	void solve(int testNumber, InputReader in, PrintWriter pw) {
		int n = in.nextInt();
		long xor = 0;
		for (int i = 0; i < n; ++i) {
			long x = in.nextLong();
			long m = in.nextLong();
			long t = (x + m - 1) % 4;
			long ans = 0;
			if (t == 0)
				ans = x + m - 1;
			else if (t == 1)
				ans = 1;
			else if (t == 2)
				ans = x + m;
			else
				ans = 0;
			t = (x - 1) % 4;
			if (t == 0)
				ans ^= (x - 1);
			else if (t == 1)
				ans ^= 1;
			else if (t == 2)
				ans ^= (x);
			else
				ans ^= 0;
			xor ^= ans;
		}
		pw.println(xor == 0 ? "bolik" : "tolik");

	}

	boolean inter(long rec1[], long rec2[]) {
		if (rec1[0] < rec2[0]) {
			if (rec2[0] <= rec1[2]) {
				if (rec1[1] < rec2[1]) {
//					System.err.println(rec2[1] + " " + rec1[3]);
					if (rec2[1] <= rec1[3]) {
						return true;
					}
				} else {
					if (rec1[1] <= rec2[3]) {
						return true;
					}
				}
			}
		} else {
			if (rec1[0] <= rec2[2]) {
//				System.err.println("hello");
				if (rec1[1] < rec2[1]) {
					if (rec2[1] <= rec1[3])
						return true;
				} else {
					if (rec1[1] <= rec2[3])
						return true;
				}

			}
		}
		return false;
	}

	long ar(long rec[]) {
		long l = Math.abs(rec[0] - rec[2]) + 1;
		long b = Math.abs(rec[1] - rec[3]) + 1;
		return l * b;

	}

	long pow(int n, int m) {
		if (m == 0)
			return 1;
		long ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}

	double pow(double n, int m) {
		if (m == 0)
			return 1;
		double ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

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

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}