#include <bits/stdc++.h>
using namespace std;
short PDH[301][301][301];
short PDV[301][301][301];
short PDD[301][301][301];
short PDZ[301][301][301];
int N;
int V[3];
int main() {
  int a, b, c, r, m;
  scanf("%d", &N);
  memset(PDH, 0, sizeof(PDH));
  memset(PDV, 0, sizeof(PDV));
  memset(PDD, 0, sizeof(PDD));
  memset(PDZ, 0, sizeof(PDZ));
  for (int i = 0; i < N; i++) {
    scanf("%d", V + i);
  }
  if (N == 1) {
    printf((V[0] ? "BitLGM\n" : "BitAryo\n"));
    return 0;
  } else if (N == 2) {
    c = V[2] = 0;
    for (a = 0; a <= V[0]; a++) {
      for (b = 0; b <= V[1]; b++) {
        if (!a && !b) {
          PDH[a][b][c] = 0;
          PDV[a][b][c] = 0;
          PDD[a][b][c] = 0;
          continue;
        }
        m = (a < b ? a : b);
        r = 0;
        if (a && PDV[a - 1][b][c] == a - 1) {
          r = 1;
        }
        if (b && PDH[a][b - 1][c] == b - 1) {
          r = 1;
        }
        if (a && b && PDD[a - 1][b - 1][c] == m - 1) {
          r = 1;
        }
        PDV[a][b][c] = (a ? PDV[a - 1][b][c] + r : r);
        PDH[a][b][c] = (b ? PDH[a][b - 1][c] + r : r);
        PDD[a][b][c] = (a && b ? PDD[a - 1][b - 1][c] + r : r);
      }
    }
    goto ali;
  }
  for (a = 0; a <= V[0]; a++) {
    for (b = 0; b <= V[1]; b++) {
      for (c = 0; c <= V[2]; c++) {
        if (!a && !b && !c) {
          PDH[a][b][c] = 0;
          PDV[a][b][c] = 0;
          PDD[a][b][c] = 0;
          continue;
        }
        m = (a < (c < b ? c : b) ? a : (c < b ? c : b));
        r = 0;
        if (a && PDV[a - 1][b][c] == a - 1) {
          r = 1;
        }
        if (b && PDH[a][b - 1][c] == b - 1) {
          r = 1;
        }
        if (c && PDZ[a][b][c - 1] == c - 1) {
          r = 1;
        }
        if (m && PDD[a - 1][b - 1][c - 1] == m - 1) {
          r = 1;
        }
        PDV[a][b][c] = (a ? PDV[a - 1][b][c] + r : r);
        PDH[a][b][c] = (b ? PDH[a][b - 1][c] + r : r);
        PDZ[a][b][c] = (c ? PDZ[a][b][c - 1] + r : r);
        PDD[a][b][c] = (a && b ? PDD[a - 1][b - 1][c - 1] + r : r);
      }
    }
  }
ali:
  r = (V[0] ? PDV[V[0]][V[1]][V[2]] - PDV[V[0] - 1][V[1]][V[2]]
            : PDV[V[0]][V[1]][V[2]]);
  printf(r ? "BitLGM\n" : "BitAryo\n");
  return 0;
}
