#include <bits/stdc++.h>
int n, a[4], f[333][333][333], t[333][333], tt[333][333], ans;
int dp(int x, int y, int z) {
  if (f[x][y][z] != -1) return f[x][y][z];
  if ((t[x][y] != -1 && t[x][y] != z) || (t[x][z] != -1 && t[x][z] != y) ||
      (t[y][z] != -1 && t[y][z] != x))
    return 1;
  int b[4];
  b[1] = x;
  b[2] = y;
  b[3] = z;
  int r = 1, tmp;
  if (x > y) {
    tmp = x;
    x = y;
    y = tmp;
  }
  if (x > z) {
    tmp = x;
    x = z;
    z = tmp;
  }
  for (int i = x; i > 0; i--) {
    if (!r) break;
    r *= dp(x - i, y - i, z - i);
  }
  for (int i = 1; i <= n; i++)
    for (int j = b[i]; j > 0; j--) {
      if (!r) break;
      b[i] -= j;
      r *= dp(b[1], b[2], b[3]);
      b[i] += j;
    }
  f[x][y][z] = f[x][z][y] = f[y][x][z] = f[y][z][x] = f[z][x][y] = f[z][y][x] =
      1 - r;
  if (r) {
    t[y][x] = t[x][y] = z;
    t[z][x] = t[x][z] = y;
    t[z][y] = t[y][z] = x;
  }
  return 1 - r;
}
int dpp(int x, int y) {
  if (f[x][y][0] != -1) return f[x][y][0];
  int tmp, r = 1;
  if (x > y) {
    tmp = x;
    x = y;
    y = tmp;
  }
  for (int i = x; i > 0; i--) {
    if (!r) break;
    r *= dpp(x - i, y - i);
    if (!r) break;
    r *= dpp(x - i, y);
  }
  for (int i = y; i > 0; i--) {
    if (!r) break;
    r *= dpp(x, y - i);
  }
  f[x][y][0] = f[y][x][0] = 1 - r;
  return 1 - r;
}
int main() {
  scanf("%d", &n);
  int sum;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  if (!sum) {
    printf("BitAryo\n");
    return 0;
  }
  if (n == 1) {
    printf("BitLGM\n");
    return 0;
  }
  for (int i = 0; i <= 300; i++)
    for (int j = 0; j <= 300; j++) f[i][j][0] = -1;
  if (n == 2) ans = dpp(a[1], a[2]);
  for (int i = 0; i <= 300; i++)
    for (int j = 0; j <= 300; j++) {
      for (int k = 0; k <= 300; k++) f[i][j][k] = -1;
    }
  for (int i = 0; i <= 300; i++)
    for (int j = 0; j <= 300; j++) {
      t[i][j] = -1;
      tt[i][j] = -1;
    }
  f[0][0][0] = 0;
  if (n == 3) ans = dp(a[1], a[2], a[3]);
  if (ans)
    printf("BitLGM\n");
  else
    printf("BitAryo\n");
  return 0;
}
