#include <cstdio>
#include <stdio.h>
#include <memory>
#include <iostream>
#include <cstring>

using namespace std;

const int MAX_N = 1111;

char events[5][MAX_N][MAX_N];
// 0 - 001, 1 - 010, 2 - 101, 3 - 011, 4 - 111 
// 0 - UND, 1 - LOSE, 2 - WIN

void init()
{
	memset(events, 0, sizeof(events));
	for (int i = 0; i < 5; i++)
		events[i][0][0] = 1;
}

int go(int mask, int cnt2, int cnt3)
{
	if (cnt2 < 0 || cnt3 < 0) return 2;
	if (events[mask][cnt2][cnt3] == 0)
	{
		bool f = false;
		int ans = 2;
		switch (mask)
		{
		case 0:
			ans &= go(2, cnt2 - 1, cnt3) & go(2, cnt2, cnt3 - 1) & go(2, cnt2 + 1, cnt3 - 1);
			ans &= go(3, cnt2 - 1, cnt3) & go(3, cnt2, cnt3 - 1) & go(3, cnt2 + 1, cnt3 - 1);
			break;
		case 1:
			ans &= go(3, cnt2 - 1, cnt3) & go(3, cnt2, cnt3 - 1) & go(3, cnt2 + 1, cnt3 - 1);
			ans &= go(0, cnt2 - 1, cnt3) & go(0, cnt2, cnt3 - 1) & go(0, cnt2 + 1, cnt3 - 1);
			ans &= go(1, cnt2 - 1, cnt3) & go(1, cnt2, cnt3 - 1) & go(1, cnt2 + 1, cnt3 - 1);
			break;
		case 2:
			ans &= go(4, cnt2 - 1, cnt3) & go(4, cnt2, cnt3 - 1) & go(4, cnt2 + 1, cnt3 - 1);
			ans &= go(1, cnt2 - 1, cnt3) & go(1, cnt2, cnt3 - 1) & go(1, cnt2 + 1, cnt3 - 1);
			ans &= go(0, cnt2 - 1, cnt3) & go(0, cnt2, cnt3 - 1) & go(0, cnt2 + 1, cnt3 - 1);
			break;
		case 3:
			ans &= go(4, cnt2 - 1, cnt3) & go(4, cnt2, cnt3 - 1) & go(4, cnt2 + 1, cnt3 - 1);
			ans &= go(1, cnt2 - 1 + 1, cnt3) & go(1, cnt2 + 1, cnt3 - 1) & go(1, cnt2 + 1 + 1, cnt3 - 1);
			ans &= go(0, cnt2 - 1 + 1, cnt3) & go(0, cnt2 + 1, cnt3 - 1) & go(0, cnt2 + 1 + 1, cnt3 - 1);
			break;
		case 4:
			ans &= go(1, cnt2 - 1, cnt3 + 1) & go(1, cnt2, cnt3 - 1 + 1) & go(1, cnt2 + 1, cnt3 - 1 + 1);
			ans &= go(0, cnt2 - 1, cnt3 + 1) & go(0, cnt2, cnt3 - 1 + 1) & go(0, cnt2 + 1, cnt3 - 1 + 1);
			break;
		default:
			break;
		}
		if (ans == 2) f = true;
		events[mask][cnt2][cnt3] = f ? 1 : 2;
	}
	return events[mask][cnt2][cnt3];
}

int main()
{
	freopen("jenga.in", "r", stdin);
	freopen("jenga.out", "w", stdout);
	int n;
	cin >> n;
//    init();
	int cnt2 = 0, cnt3 = 0;
	int a, b, c, d;
	for (int i = 1; i < n; i++)
	{
		cin >> a >> b >> c;
		d = a * 4 + b * 2 + c;
		switch (d)
		{
			case 7: cnt3++; break;
			case 3: cnt2++; break;
			case 6: cnt2++; break;
			default: break;
		}	
	}
	cin >> a >> b >> c;
	d = 4 * a + b * 2 + c;
	int mask = -1;
	switch (d)
	{
		case 0: return 666;
		case 1: mask = 0; break;
		case 2: mask = 1; break;
		case 3: mask = 3; break;
		case 4: mask = 0; break;
		case 5: mask = 2; break;
		case 6: mask = 3; break;
		case 7: mask = 4; break;
		default: break;
	}
	cout << ((go(mask, cnt2, cnt3) == 2) ? "Alex\n" : "Igor\n");
	return 0;
}
