#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int dp[300][300];
int a[4];
int dfs2(int x, int y) {
  if (dp[x][y])
    return dp[x][y];
  else if (min(x, y) == 0)
    return max(x, y) > 0 ? 1 : -1;
  int k = min(x, y);
  for (int i = 1; i <= k; ++i) {
    if (dfs2(x - i, y - i) == -1) return dp[x][y] = 1;
  }
  k = max(x, y);
  for (int i = 1; i <= k; ++i) {
    if (i <= x && dfs2(x - i, y) == -1) return dp[x][y] = 1;
    if (i <= y && dfs2(x, y - i) == -1) return dp[x][y] = 1;
  }
  return dp[x][y] = -1;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  assert(n < 4);
  string res = "BitLGM";
  for (int i = 0; i < n; ++i) cin >> a[i];
  dp[0][0] = -1;
  if (n == 1) {
    if (a[0] == 0) res = "BitAryo";
  } else if (n == 2) {
    if (dfs2(a[0], a[1]) == -1) res = "BitAryo";
  } else {
    if ((a[0] ^ a[1] ^ a[2]) == 0) res = "BitAryo";
  }
  cout << res << endl;
  return 0;
}
