import java.io.*;
import java.util.*;

public class jenga_vd_wa4 {
	BufferedReader in;
	StringTokenizer str;
	PrintWriter out;
	String SK;

	String next() throws IOException {
		while ((str == null) || (!str.hasMoreTokens())) {
			SK = in.readLine();
			if (SK == null)
				return null;
			str = new StringTokenizer(SK);
		}
		return str.nextToken();
	}

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

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

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

	byte[][][] win;

	int solve(int c1, int c2, int type) {
		if (win[type][c1][c2] != 0) {
			return win[type][c1][c2];
		}
		win[type][c1][c2] = 2;
		if (c1 > 0) {
			for (int i : next[type]) {
				if (solve(c1 - 1, c2, i) == 2) {
					win[type][c1][c2] = 1;
					return win[type][c1][c2];
				}
			}
			if (fine[type]) {
				for (int i : next[0]) {
					if (solve(c1 - 1 + add1[type], c2 + add2[type], i) == 2) {
						win[type][c1][c2] = 1;
						return win[type][c1][c2];
					}
				}
			}
		}
		if (c2 > 0) {
			for (int i : next[type]) {
				if (solve(c1 + 1, c2 - 1, i) == 2) {
					win[type][c1][c2] = 1;
					return win[type][c1][c2];
				}
				if (solve(c1, c2 - 1, i) == 2) {
					win[type][c1][c2] = 1;
					return win[type][c1][c2];
				}
			}
			if (fine[type]) {
				for (int i : next[0]) {
					if (solve(c1 + 1 + add1[type], c2 + add2[type] - 1, i) == 2) {
						win[type][c1][c2] = 1;
						return win[type][c1][c2];

					}
				}
			}
		}

		for (int i : rem[type]) {
			for (int j : next[0]) {
				if (solve(c1 + add1[i], c2 + add2[i], j) == 2) {
					win[type][c1][c2] = 1;
					return win[type][c1][c2];
				}
			}
		}

		return win[type][c1][c2];
	}

	boolean[] fine = { false, false, true, true, false, true, true, true };
	int[][] next = { { 1, 2 }, { 3, 5 }, { 3}, { 7 }, { 5, 3 }, { 7 },
			{ 7 }, {} };
	int[][] rem = { {}, {}, {}, { 2}, {}, {}, { 2 }, { 3, 5} };
	int[] add1 = { 0, 0, 0, 1, 0, 0, 1, 0 };
	int[] add2 = { 0, 0, 0, 0, 0, 0, 0, 1 };

	void solve() throws IOException {
		long tm = System.currentTimeMillis();
		int n = nextInt();
		int[] type = new int[n];
		win = new byte[8][2*n + 1][2*n + 1];
		for (int i = 0; i < n; i++) {
			type[i] = 4 * nextInt() + 2 * nextInt() + nextInt();
		}
		int c1 = 0;
		int c2 = 0;
		for (int i = 0; i < n - 1; i++) {
			c1 += add1[type[i]];
			c2 += add2[type[i]];
		}
		int k = solve(c1, c2, type[n - 1]);
		if (k == 1) {
			out.println("Alex");
		} else {
			out.println("Igor");
		}
		System.err.println(System.currentTimeMillis() - tm);
	}

	void run() throws IOException {
		in = new BufferedReader(new FileReader("jenga.in"));
		out = new PrintWriter("jenga.out");
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new jenga_vd_wa4().run();
	}
}
