#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
#pragma GCC optimize("O3")
using namespace std;
const int INF = 1000000007;
const long long INF2 = 1000000000000000007;
const long long MOD = 998244353;
const long long MOD1 = 1864463441;
const int SIZE = 310;
const double eps = 1e-6;
uniform_int_distribution<int> uid(5, 10);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long n, m, t, k, q1, a, b, c, q2, q3, res, l, r;
bool used[SIZE][SIZE];
long long dd[SIZE][SIZE];
set<long long> sett;
long long mex(long long a, long long b) {
  set<long long> st;
  for (int i = 1; i < b + 1; ++i) {
    if (a >= i) {
      st.insert(dd[a - i][b]);
      st.insert(dd[a - i][b - i]);
    }
    if (b - i >= a)
      st.insert(dd[a][b - i]);
    else
      st.insert(dd[b - i][a]);
  }
  for (int i = 0;; ++i)
    if (!st.count(i)) return dd[a][b] = i;
}
bool g(long long a, long long b) {
  if (used[a][b]) return dd[a][b];
  used[a][b] = 1;
  for (int i = 1; i < b + 1; ++i) {
    if (a >= i) {
      dd[a][b] |= !g(a - i, b);
      dd[a][b] |= !g(a - i, b - i);
    }
    if (b - i >= a) {
      dd[a][b] |= !g(a, b - i);
    } else {
      dd[a][b] |= !g(b - i, a);
    }
  }
  return dd[a][b];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  used[0][0] = 1;
  dd[0][0] = 0;
  if (n == 1) {
    cin >> a;
    if (a)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  } else if (n == 2) {
    cin >> a >> b;
    if (a > b) swap(a, b);
    for (int i = 1; i < a + 1; ++i) {
      used[0][i] = 1;
      dd[0][i] = 1;
      used[i][i] = 1;
      dd[i][i] = 1;
    }
    used[0][0] = 1;
    dd[0][0] = 0;
    res = g(a, b);
    if (res)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  } else {
    cin >> a >> b >> c;
    res = a ^ b ^ c;
    if (res != 0) {
      cout << "BitLGM";
    } else {
      cout << "BitAryo";
    }
  }
  return 0;
}
