#include <bits/stdc++.h>
using namespace std;
int INP, AM, REACHEOF;
char BUF[(1 << 12) + 1], *inp = BUF;
const long double PI = acos((long double)-1.0);
int n, a[5], win[333][333];
int main() {
  while (cin >> n) {
    for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];
    if (n == 1) {
      if (a[1] == 0)
        puts("BitAryo");
      else
        puts("BitLGM");
    } else if (n == 2) {
      memset(win, -1, sizeof win);
      for (int i = (0), _b = (300); i <= _b; i++)
        for (int j = (0), _b = (300); j <= _b; j++) {
          win[i][j] = 0;
          for (int ii = (0), _b = (i - 1); ii <= _b; ii++)
            if (!win[ii][j]) {
              win[i][j] = 1;
              break;
            }
          for (int jj = (0), _b = (j - 1); jj <= _b; jj++)
            if (!win[i][jj]) {
              win[i][j] = 1;
              break;
            }
          for (int x = (1), _b = (min(i, j)); x <= _b; x++)
            if (!win[i - x][j - x]) {
              win[i][j] = 1;
              break;
            }
        }
      if (win[a[1]][a[2]])
        puts("BitLGM");
      else
        puts("BitAryo");
    } else {
      if (a[1] ^ a[2] ^ a[3])
        puts("BitLGM");
      else
        puts("BitAryo");
    }
  }
  return 0;
}
