#include <bits/stdc++.h>
using namespace std;
int n, a[5];
int f[305][305];
void calc(int x, int y) {
  if (f[x][y] != -1) return;
  f[x][y] = false;
  for (int i = 0; i < x; i++) {
    calc(i, y);
    if (!f[i][y]) f[x][y] = true;
  }
  for (int i = 0; i < y; i++) {
    calc(x, i);
    if (!f[x][i]) f[x][y] = true;
  }
  for (int i = 1; i <= x && i <= y; i++) {
    calc(x - i, y - i);
    if (!f[x - i][y - i]) f[x][y] = true;
  }
}
int main() {
  scanf("%d", &n);
  memset(f, -1, sizeof(f));
  f[0][0] = 0;
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  switch (n) {
    case 1:
      if (a[1])
        puts("BitLGM");
      else
        puts("BitAryo");
      break;
    case 2:
      calc(a[1], a[2]);
      if (f[a[1]][a[2]])
        puts("BitLGM");
      else
        puts("BitAryo");
      break;
    case 3:
      if (a[1] ^ a[2] ^ a[3])
        puts("BitLGM");
      else
        puts("BitAryo");
      break;
    default:
      break;
  }
  return 0;
}
