Since most contestants do not read this part, I have to repeat that Bitlandians are quite weird. They have their own jobs, their own working method, their own lives, their own sausages and their own games!

Since you are so curious about Bitland, I'll give you the chance of peeking at one of these games.

BitLGM and BitAryo are playing yet another of their crazy-looking genius-needed Bitlandish games. They've got a sequence of *n* non-negative integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. The players make moves in turns. BitLGM moves first. Each player can and must do one of the two following actions in his turn:
 -  Take one of the integers (we'll denote it as *a*<sub class="lower-index">*i*</sub>). Choose integer *x* (1 ≤ *x* ≤ *a*<sub class="lower-index">*i*</sub>). And then decrease *a*<sub class="lower-index">*i*</sub> by *x*, that is, apply assignment: *a*<sub class="lower-index">*i*</sub> = *a*<sub class="lower-index">*i*</sub> - *x*. -  Choose integer *x* <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/9bcd77b1a4d70adef53560c92a78c087c5d0039f.png" style="max-width: 100.0%;max-height: 100.0%;"/>. And then decrease all *a*<sub class="lower-index">*i*</sub> by *x*, that is, apply assignment: *a*<sub class="lower-index">*i*</sub> = *a*<sub class="lower-index">*i*</sub> - *x*, for all *i*. 
The player who cannot make a move loses.

You're given the initial sequence *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. Determine who wins, if both players plays optimally well and if BitLGM and BitAryo start playing the described game in this sequence.
The first line contains an integer *n* (1 ≤ *n* ≤ 3).

The next line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> &lt; 300).
# LUOGU_RID: 133022591
# pypy3
from collections import *
from itertools import *
from functools import *
from bisect import *
from heapq import *
import sys
IN = lambda: sys.stdin.readline().rstrip("\r\n")
PN = lambda x: sys.stdout.write(x)
I = lambda: int(IN())
S = lambda: IN().split()
M = lambda: map(int, IN().split())
L = lambda: list(map(int, IN().split()))
G = lambda: map(lambda x: int(x) - 1, IN().split())

def new_list(shape, value = 0):
    if len(shape) == 0:
        return value
    else:
        return [new_list(shape[1:], value = value) for _ in range(shape[0])]

n = I()
a = L()

if n == 1:
    print("BitLGM" if a[0] > 0 else "BitAryo")
    exit(0)

if n == 2:
    f = new_list([301, 301], False)
    for i in range(301):
        for j in range(301):
            for x in range(i):
                f[i][j] |= not f[x][j]
            for x in range(j):
                f[i][j] |= not f[i][x]
            for x in range(1, min(i, j) + 1):
                f[i][j] |= not f[i - x][j - x]
    print("BitLGM" if f[a[0]][a[1]] else "BitAryo")
    
if n == 3:
    print("BitLGM" if reduce(lambda x, y: x ^ y, a) > 0 else "BitAryo")
        