#include <bits/stdc++.h>
using namespace std;
const int MAXN = 307;
int a[7];
int win2[MAXN][MAXN];
int win3[MAXN][MAXN][MAXN];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int i, j, k;
    for (i = 0; i < n; i++) scanf("%d", a + i);
    if (n == 1)
      puts(a[0] ? "BitLGM" : "BitAryo");
    else if (n == 3)
      puts(a[0] ^ a[1] ^ a[2] ? "BitLGM" : "BitAryo");
    else {
      for (i = 0; i <= a[0]; i++)
        for (j = 0; j <= a[1]; j++) {
          if (win2[i][j]) continue;
          for (k = 1;; k++) {
            if (i + k > a[0] && j + k > a[1]) break;
            if (i + k <= a[0] && j + k <= a[1]) win2[i + k][j + k] = 1;
            if (i + k <= a[0]) win2[i + k][j] = 1;
            if (j + k <= a[1]) win2[i][j + k] = 1;
          }
        }
      puts(win2[a[0]][a[1]] ? "BitLGM" : "BitAryo");
    }
  }
  return 0;
}
