#include <bits/stdc++.h>
using namespace std;
const int maxn = 305;
int SG[maxn][maxn];
bool v[maxn * maxn];
int main() {
  memset(SG, 0, sizeof(SG));
  int i, j, k, l;
  for (i = 0; i < maxn; ++i)
    for (j = 0; j < maxn; ++j) {
      memset(v, 0, sizeof(v));
      int u = max(i, j), d = min(i, j);
      for (l = 1; l <= u; ++l) {
        if (l <= i) v[SG[i - l][j]] = true;
        if (l <= j) v[SG[i][j - l]] = true;
        if (l <= d) v[SG[i - l][j - l]] = true;
      }
      for (SG[i][j] = 0; v[SG[i][j]]; ++SG[i][j])
        ;
    }
  int N, a[4];
  while (scanf("%d", &N) != EOF) {
    int i, ans = 0;
    for (i = 0; i < N; ++i) {
      scanf("%d", &a[i]);
      ans ^= a[i];
    }
    if (N == 1) {
      if (a[0])
        puts("BitLGM");
      else
        puts("BitAryo");
    } else if (N == 2) {
      if (SG[a[0]][a[1]])
        puts("BitLGM");
      else
        puts("BitAryo");
    } else {
      if (ans)
        puts("BitLGM");
      else
        puts("BitAryo");
    }
  }
}
