#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long double PI = acos(-1);
const int MOD = 1000000007;
const int FMOD = 998244353;
const long double eps = 1e-9;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());
void solve();
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int t = 1;
  for (int testcase = 1; testcase < t + 1; testcase++) {
    solve();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
}
const int MAXN = 301;
int n;
vector<int> a;
int dp[MAXN][MAXN];
string player1 = "BitLGM";
string player2 = "BitAryo";
void solve() {
  memset(dp, 0, sizeof dp);
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[0][0] = 0;
  for (int i = 0; i < MAXN; i++) {
    for (int j = 0; j < MAXN; j++) {
      if (dp[i][j] == 0) {
        for (int k = 1; k + i < MAXN; k++) dp[i + k][j] = 1;
        for (int k = 1; k + j < MAXN; k++) dp[i][j + k] = 1;
        for (int k = 1; max(k + i, k + j) < MAXN; k++) dp[i + k][j + k] = 1;
      } else {
        for (int k = 1; k + i < MAXN; k++) dp[i + k][j] |= 0;
        for (int k = 1; k + j < MAXN; k++) dp[i][j + k] |= 0;
        for (int k = 1; max(k + i, k + j) < MAXN; k++) dp[i + k][j + k] |= 0;
      }
    }
  }
  if (n == 1) {
    if (a[0])
      cout << player1;
    else
      cout << player2;
  } else if (n == 2) {
    if (dp[a[0]][a[1]])
      cout << player1;
    else
      cout << player2;
  } else if (a[0] ^ a[1] ^ a[2])
    cout << player1;
  else
    cout << player2;
}
