#include <bits/stdc++.h>
using namespace std;
const int MM = 305;
int n, a[MM];
bool dp[MM][MM][MM], has_lose[4][MM][MM], mp[MM * 2][MM * 2];
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  mp[MM][MM] = 1;
  for (int i = 1; i <= 3; i++) has_lose[i][0][0] = 1;
  for (int i = 0; i <= a[1]; i++) {
    for (int j = 0; j <= a[2]; j++) {
      for (int k = 0; k <= a[3]; k++) {
        if (i == 0 && j == 0 && k == 0) continue;
        dp[i][j][k] |= has_lose[1][j][k];
        dp[i][j][k] |= has_lose[2][i][k];
        dp[i][j][k] |= has_lose[3][i][j];
        pair<int, int> diffs = {i - j, (n > 2 ? j - k : 0)};
        dp[i][j][k] |= mp[diffs.first + MM][diffs.second + MM];
        has_lose[1][j][k] |= !dp[i][j][k];
        has_lose[2][i][k] |= !dp[i][j][k];
        has_lose[3][i][j] |= !dp[i][j][k];
        mp[diffs.first + MM][diffs.second + MM] |= !dp[i][j][k];
      }
    }
  }
  cout << (dp[a[1]][a[2]][a[3]] ? "BitLGM" : "BitAryo") << "\n";
}
