#include <bits/stdc++.h>
#pragma comment(linker, "/stack:16777216")
using namespace std;
const int INF = 1 << 30;
const int MAX = 302;
int n;
int A[4];
bool R[MAX][MAX][MAX];
bool W[3][MAX][MAX];
int U[MAX + MAX + 7][MAX + MAX + 7];
void solve_3() {
  R[0][0][0] = 0;
  for (int i = (0); i < (3); ++i) W[i][0][0] = 1;
  U[MAX][MAX] = 1;
  for (int i = (0); i < (MAX); ++i)
    for (int j = (0); j < (MAX); ++j)
      for (int k = (0); k < (MAX); ++k) {
        if (i == 0 && j == 0 && k == 0) continue;
        if (W[0][j][k]) R[i][j][k] = 1;
        if (W[1][i][k]) R[i][j][k] = 1;
        if (W[2][i][j]) R[i][j][k] = 1;
        if (U[j - i + MAX][k - j + MAX]) R[i][j][k] = 1;
        if (R[i][j][k] == 0) {
          W[0][j][k] = 1;
          W[1][i][k] = 1;
          W[2][i][j] = 1;
          U[j - i + MAX][k - j + MAX] = 1;
        }
      }
  cout << (R[A[0]][A[1]][A[2]] ? "BitLGM" : "BitAryo") << endl;
}
void solve_2() {
  R[0][0][0] = 0;
  for (int i = (0); i < (2); ++i) W[i][0][0] = 1;
  U[MAX][0] = 1;
  for (int i = (0); i < (MAX); ++i)
    for (int j = (0); j < (MAX); ++j)
      for (int k = (0); k < (1); ++k) {
        if (i == 0 && j == 0) continue;
        if (W[0][j][k]) R[i][j][k] = 1;
        if (W[1][i][k]) R[i][j][k] = 1;
        if (U[j - i + MAX][0]) R[i][j][k] = 1;
        if (R[i][j][k] == 0) {
          W[0][j][k] = 1;
          W[1][i][k] = 1;
          U[j - i + MAX][0] = 1;
        }
      }
  cout << (R[A[0]][A[1]][0] ? "BitLGM" : "BitAryo") << endl;
}
int main() {
  cin >> n;
  for (int i = (0); i < (n); ++i) cin >> A[i];
  if (n == 1)
    cout << (A[0] > 0 ? "BitLGM" : "BitAryo") << endl;
  else if (n == 2)
    solve_2();
  else
    solve_3();
  return 0;
}
