#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using std::bitset;
using namespace std;
int g[302][302][302], f[302][302];
int s[10];
int n, ans;
void updateg(int a, int b, int c) {
  int i, j, tem, t;
  for (i = c + 1; i < 300; i++) {
    g[a][b][i] = 1;
    g[a][c][i] = 1;
    g[b][c][i] = 1;
  }
  for (i = b + 1; i <= c; i++) {
    g[a][i][c] = 1;
    g[b][i][c] = 1;
  }
  for (i = a + 1; i <= b; i++) g[i][b][c] = 1;
  for (t = 1; c + t < 300; t++) g[a + t][b + t][c + t] = 1;
}
void updatef(int a, int b) {
  int i, j, tem, t;
  for (i = b + 1; i < 300; i++) {
    f[a][i] = 1;
    f[b][i] = 1;
  }
  for (i = a + 1; i <= b; i++) f[i][b] = 1;
  for (t = 1; b + t < 300; t++) f[a + t][b + t] = 1;
}
void init() {
  int i, j, tem;
  memset(g, -1, sizeof(g));
  ;
  int a, b, c;
  for (a = 0; a < 300; a++)
    for (b = a; b < 300; b++)
      for (c = b; c < 300; c++) {
        if (g[a][b][c] == -1) {
          g[a][b][c] = 0;
          updateg(a, b, c);
        }
      }
  memset(f, -1, sizeof(f));
  ;
  for (a = 0; a < 300; a++)
    for (b = a; b < 300; b++) {
      if (f[a][b] == -1) {
        f[a][b] = 0;
        updatef(a, b);
      }
    }
}
int main() {
  int i, j, tem;
  init();
  while (scanf("%d", &n) != EOF) {
    memset(s, 0, sizeof(s));
    ;
    for (i = 1; i <= n; i++) scanf("%d", &s[i]);
    if (n == 1) {
      if (s[1] != 0)
        printf("BitLGM\n");
      else
        printf("BitAryo\n");
    } else if (n == 2) {
      if (s[1] > s[2]) swap(s[1], s[2]);
      if (f[s[1]][s[2]] == 1)
        printf("BitLGM\n");
      else
        printf("BitAryo\n");
    } else {
      sort(s + 1, s + 1 + 3);
      if (g[s[1]][s[2]][s[3]] == 1)
        printf("BitLGM\n");
      else
        printf("BitAryo\n");
    }
  }
  return 0;
}
