#include <bits/stdc++.h>
using namespace std;
const long long INFLL = 2 * (long long)1e18 + 100;
const int INFINT = 2 * (int)1e9 + 100;
const double PI = atan(1) * 4;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int NMAX = 300 + 5;
int n;
bool dp[NMAX][NMAX][NMAX], calc[NMAX][NMAX][NMAX];
int a[4];
int start, finish;
ofstream fout("AUX_notwindows.txt");
void solve_two(int a, int b) {
  if (calc[0][a][b]) return;
  if (b == 0) {
    dp[0][a][0] = 0;
    calc[0][a][0] = 1;
    return;
  }
  if (a == 0) {
    dp[0][0][b] = 0;
    calc[0][0][b] = 1;
    return;
  }
  for (int i = 1; i <= min(a, b); i++)
    if (!calc[0][a - i][b - i]) solve_two(a - i, b - i);
  for (int i = 1; i <= a; i++)
    if (!calc[0][a - i][b]) solve_two(a - i, b);
  for (int i = 1; i <= b; i++)
    if (!calc[0][a][b - i]) solve_two(a, b - i);
  for (int i = 1; i <= min(a, b); i++)
    if (dp[0][a - i][b - i]) {
      calc[0][a][b] = 1;
      calc[a][0][b] = 1;
      calc[a][b][0] = 1;
      return;
    }
  for (int i = 1; i <= a; i++)
    if (dp[0][a - i][b]) {
      calc[0][a][b] = 1;
      calc[a][0][b] = 1;
      calc[a][b][0] = 1;
      return;
    }
  for (int i = 1; i <= b; i++)
    if (dp[0][a][b - i]) {
      calc[0][a][b] = 1;
      calc[a][0][b] = 1;
      calc[a][b][0] = 1;
      return;
    }
  calc[0][a][b] = 1;
  calc[a][0][b] = 1;
  calc[a][b][0] = 1;
  dp[0][a][b] = 1;
  dp[a][0][b] = 1;
  dp[a][b][0] = 1;
}
void solve(int a, int b, int c) {
  if (calc[a][b][c]) return;
  finish = clock();
  int mmin = min(a, b);
  mmin = min(mmin, c);
  for (int i = 1; i <= mmin; i++) {
    if (!calc[a - i][b - i][c - i]) solve(a - i, b - i, c - i);
    if (dp[a - i][b - i][c - i]) {
      calc[a][b][c] = 1;
      return;
    }
  }
  for (int i = 1; i <= a; i++) {
    if (!calc[a - i][b][c]) solve(a - i, b, c);
    if (dp[a - i][b][c]) {
      calc[a][b][c] = 1;
      return;
    }
  }
  for (int i = 1; i <= b; i++) {
    if (!calc[a][b - i][c]) solve(a, b - i, c);
    if (dp[a][b - i][c]) {
      calc[a][b][c] = 1;
      return;
    }
  }
  for (int i = 1; i <= c; i++) {
    if (!calc[a][b][c - i]) solve(a, b, c - i);
    if (dp[a][b][c - i]) {
      calc[a][b][c] = 1;
      return;
    }
  }
  dp[a][b][c] = 1;
  calc[a][b][c] = 1;
}
int main() {
  start = clock();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  dp[0][0][0] = 1;
  calc[0][0][0] = 1;
  for (int i = 0; i < NMAX; i++)
    for (int j = 0; j < NMAX; j++)
      if (!calc[0][i][j]) {
        solve_two(i, j);
        dp[i][0][j] = dp[0][i][j];
        dp[i][j][0] = dp[0][i][j];
        calc[i][0][j] = 1;
        calc[i][j][0] = 1;
      }
  if (n == 1) {
    if (a[1])
      cout << "BitLGM";
    else
      cout << "BitAryo";
  } else if (n == 2) {
    bool tmp = dp[0][a[1]][a[2]];
    if (tmp == 1)
      cout << "BitAryo";
    else
      cout << "BitLGM";
  } else if (n == 3) {
    int tmp = 0;
    tmp ^= a[1];
    tmp ^= a[2];
    tmp ^= a[3];
    if (tmp)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  }
  return 0;
}
