#include <bits/stdc++.h>
using namespace std;
void wins(int x) {
  if (x == 0)
    cout << "BitLGM" << endl;
  else
    cout << "BitAryo" << endl;
  exit(0);
}
const int MAXN = 305;
int a[3], n;
int dp3[MAXN][MAXN][MAXN], dp2[MAXN][MAXN], helper[MAXN * 2][MAXN * 2],
    h12[MAXN][MAXN], h23[MAXN][MAXN], h13[MAXN][MAXN];
int main() {
  cin >> n;
  for (register int i = (0); i < (int)(n); ++i) cin >> a[i];
  if (n == 1) {
    wins(a[0] == 0);
  } else if (n == 2) {
    for (register int i = (0); i < (int)(MAXN); ++i)
      for (register int j = (0); j < (int)(MAXN); ++j) {
        for (register int x = (0); x < (int)(i); ++x)
          dp2[i][j] |= dp2[x][j] == false;
        for (register int x = (0); x < (int)(j); ++x)
          dp2[i][j] |= dp2[i][x] == false;
        for (register int x = (1); x < (int)(min(i, j) + 1); ++x)
          dp2[i][j] |= dp2[i - x][j - x] == false;
      }
    wins(!dp2[a[0]][a[1]]);
  } else if (n == 3) {
    for (register int i = (0); i < (int)(MAXN); ++i)
      for (register int j = (0); j < (int)(MAXN); ++j)
        for (register int k = (0); k < (int)(MAXN); ++k) {
          dp3[i][j][k] |= h12[i][j];
          dp3[i][j][k] |= h13[i][k];
          dp3[i][j][k] |= h23[j][k];
          dp3[i][j][k] |= helper[i - j + MAXN][j - k + MAXN];
          if (dp3[i][j][k] == false)
            h12[i][j] = h13[i][k] = h23[j][k] =
                helper[i - j + MAXN][j - k + MAXN] = true;
        }
    wins(!dp3[a[0]][a[1]][a[2]]);
  }
  return 0;
}
