#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int M = 300;
const int mod = 1000000007;
const double eps = 1e-8;
const double Pi = 2 * acos(0.0);
bool dp[M][M][M];
bool dp2[M][M];
void go(int x, int y) {
  for (int i = x + 1; i < M; i++) dp2[i][y] = 1;
  for (int i = y + 1; i < M; i++) dp2[x][i] = 1;
  int t = 300 - max(x, y);
  for (int i = 1; i < t; i++) dp2[x + i][y + i] = 1;
}
void go2(int x, int y, int z) {
  for (int i = x + 1; i < M; i++) dp[i][y][z] = 1;
  for (int i = y + 1; i < M; i++) dp[x][i][z] = 1;
  for (int i = z + 1; i < M; i++) dp[x][y][i] = 1;
  int t = 300 - max(z, max(x, y));
  for (int i = 1; i < t; i++) dp[x + i][y + i][z + i] = 1;
}
void init() {
  memset(dp, 0, sizeof(dp));
  memset(dp2, 0, sizeof(dp2));
  for (int i = 0; i < M; i++)
    for (int j = 0; j < M; j++)
      if (dp2[i][j] == 0) go(i, j);
  for (int i = 0; i < M; i++)
    for (int j = 0; j < M; j++)
      for (int k = 0; k < M; k++)
        if (dp[i][j][k] == 0) go2(i, j, k);
}
int main() {
  int x, y, z, n;
  ios::sync_with_stdio(0);
  cin >> n;
  init();
  if (n == 1) {
    cin >> x;
    cout << (x ? "BitLGM" : "BitAryo");
  } else if (n == 2) {
    cin >> x >> y;
    cout << (dp2[x][y] ? "BitLGM" : "BitAryo");
  } else {
    cin >> x >> y >> z;
    cout << (dp[x][y][z] ? "BitLGM" : "BitAryo");
  }
  return 0;
}
