#include <bits/stdc++.h>
using namespace std;
int n;
int mas[3];
bool dp[301][301];
void print(int v) {
  if (v) {
    cout << "BitLGM";
  } else {
    cout << "BitAryo";
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
  }
  if (n == 1) {
    print(mas[0]);
    return 0;
  }
  dp[0][0] = 0;
  dp[1][0] = 1;
  dp[0][1] = 1;
  if (n == 2) {
    for (int i = 2; i <= mas[0]; i++) {
      dp[i][0] = 1;
    }
    for (int i = 2; i <= mas[1]; i++) {
      dp[0][i] = 1;
    }
    for (int i = 1; i <= mas[0]; i++) {
      for (int j = 1; j <= mas[1]; j++) {
        for (int k = 1; k <= min(i, j) && i >= k && j >= k; k++) {
          dp[i][j] += !dp[i - k][j - k];
        }
        for (int k = 1; k <= i; k++) {
          dp[i][j] += !dp[i - k][j];
        }
        for (int k = 1; k <= j; k++) {
          dp[i][j] += !dp[i][j - k];
        }
      }
    }
    print(dp[mas[0]][mas[1]]);
  } else {
    print(mas[0] ^ mas[1] ^ mas[2]);
  }
  return 0;
}
