#include <bits/stdc++.h>
using namespace std;
const int maxN = 310;
int n, t[4], res;
char f[maxN][maxN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> t[i];
  if (n == 1)
    res = t[1];
  else if (n == 3)
    res = t[1] ^ t[2] ^ t[3];
  else {
    res = 1;
    for (int i = 0; i < maxN; ++i)
      for (int j = 0; j < maxN; ++j)
        if (!f[i][j]) {
          for (int k = 1; i + k < maxN; ++k) f[i + k][j] = 1;
          for (int k = 1; j + k < maxN; ++k) f[i][j + k] = 1;
          for (int k = 1; i + k < maxN && j + k < maxN; ++k)
            f[i + k][j + k] = 1;
        }
    res = f[t[1]][t[2]];
  }
  if (res)
    printf("BitLGM");
  else
    printf("BitAryo");
}
