import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class jenga_ak {

    static final int[][] TURNS = new int[][]{
            new int[]{1, 2}, // 0
            new int[]{3, 5}, // 1
            new int[]{3}, // 2
            new int[]{7}, // 3
            null, // 4
            new int[]{7}, // 5
            null, // 6
            new int[]{} // 7
    };

    boolean isStable(int layer) {
        return layer == 2 || layer == 3 || layer == 5 || layer == 7;
    }

    Boolean[][][] win;

    boolean play(int full, int centerBorder, int upper) {
        if (win[upper][full][centerBorder] != null) {
            return win[upper][full][centerBorder];
        }
        boolean res = turnsFromFull(full, centerBorder, upper)
                || turnsFromCB(full, centerBorder, upper)
                || turnsLiftUpper(full, centerBorder, upper);
        win[upper][full][centerBorder] = res;
        return res;
    }

    boolean turnsFromFull(int full, int centerBorder, int upper) {
        if (full > 0) {
            for (int to : TURNS[upper]) {
                if (!play(full - 1, centerBorder, to) || !play(full - 1, centerBorder + 1, to)) {
                    return true;
                }
            }

            if (upper == 5 || upper == 2) {
                for (int to : TURNS[0]) {
                    if (!play(full - 1, centerBorder, to) || !play(full - 1, centerBorder + 1, to)) {
                        return true;
                    }
                }
            } else if (upper == 3) {
                for (int to : TURNS[0]) {
                    if (!play(full - 1, centerBorder + 1, to) || !play(full - 1, centerBorder + 2, to)) {
                        return true;
                    }
                }
            } else if (upper == 7) {
                for (int to : TURNS[0]) {
                    if (!play(full, centerBorder, to) || !play(full, centerBorder + 1, to)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

    boolean turnsFromCB(int full, int centerBorder, int upper) {
        if (centerBorder > 0) {
            for (int to : TURNS[upper]) {
                if (!play(full, centerBorder - 1, to)) {
                    return true;
                }
            }
            if (upper == 2 || upper == 5) {
                for (int to : TURNS[0]) {
                    if (!play(full, centerBorder - 1, to)) {
                        return true;
                    }
                }
            } else if (upper == 3) {
                for (int to : TURNS[0]) {
                    if (!play(full, centerBorder, to)) {
                        return true;
                    }
                }
            } else if (upper == 7) {
                for (int to : TURNS[0]) {
                    if (!play(full + 1, centerBorder - 1, to)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

    static boolean in(int val, int[] a) {
        for (int i = 0; i < a.length; i++) {
            if (a[i] == val) {
                return true;
            }
        }
        return false;
    }

    final static int [] STABLES = new int[] {2, 3, 5, 7};
    boolean turnsLiftUpper(int full, int centerBorder, int upper) {
        for (int to : STABLES) {
            if (!in(upper, TURNS[to])) {
                continue;
            }
            int newUpper = upper - to;
            if (newUpper == 4) {
                newUpper = 1;
            }
            int newCenterBorder = centerBorder;
            if (to == 3) {
                newCenterBorder++;
            }
            if (!play(full, newCenterBorder, newUpper)) {
                return true;
            }
        }
        return false;
    }

    int parseUpper(int a, int b, int c) {
        if (a + b + c == 3)
            return 7;
        if ((a == 1 && b == 1) || (b == 1 && c == 1))
            return 3;
        if (a == 1 && c == 1)
            return 5;
        if (a == 1 || c == 1)
            return 1;
        if (b == 1)
            return 2;
        throw new AssertionError();
    }

    void solve() {
        int n = in.nextInt();
        win = new Boolean[8][n + 1][n + 1];
        int full = 0, centerBorder = 0;
        for (int i = 0; i < n - 1; i++) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            if (a == 1 && b == 1 && c == 1) {
                full++;
            } else if ((a == 1 && b == 1) || (c == 1 && b == 1)) {
                centerBorder++;
            }
        }
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int upper = parseUpper(a, b, c);
        boolean res = play(full, centerBorder, upper);
        out.println(res ? "Alex" : "Igor");
    }

    static Scanner in;
    static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        in = new Scanner(new File("jenga.in"));
        out = new PrintWriter("jenga.out");
        new jenga_ak().solve();
        out.close();
    }
}
