#include <bits/stdc++.h>
using namespace std;
int n, a[5], A, B, C;
bool win[305][305], dp[305][305][305], Min[305][305][305];
void print(bool x) {
  if (x)
    puts("BitLGM");
  else
    puts("BitAryo");
  exit(0);
}
void solve1() { print(A > 0); }
void solve2() {
  for (int i = 0; i <= 300; ++i) win[i][0] = win[0][i] = (i > 0);
  for (int i = 1; i <= A; ++i) {
    for (int j = 1; j <= B; ++j) {
      bool ok = 0;
      for (int k = 1; k <= i || k <= j && !ok; ++k) {
        if (k <= i && !win[i - k][j]) ok = 1;
        if (k <= j && !win[i][j - k]) ok = 1;
        if (k <= i && k <= j && !win[i - k][j - k]) ok = 1;
      }
      win[i][j] = ok;
    }
  }
  print(win[A][B]);
}
void solve3() {
  for (int i = 0; i <= A; ++i)
    for (int j = 0; j <= B; ++j)
      for (int k = 0; k <= C; ++k)
        if (!dp[i][j][k]) {
          int M = max(max(A - i, B - j), C - k);
          for (int l = 1; l <= M; ++l) {
            if (l + i <= A) dp[l + i][j][k] = 1;
            if (l + j <= B) dp[i][l + j][k] = 1;
            if (l + k <= C) dp[i][j][l + k] = 1;
            if (l + i <= A && l + j <= B && l + k <= C)
              dp[l + i][l + j][l + k] = 1;
          }
        }
  print(dp[A][B][C]);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  A = a[0], B = a[1], C = a[2];
  if (n == 1) solve1();
  if (n == 2) solve2();
  if (n == 3) solve3();
  return 0;
}
