#include <bits/stdc++.h>
using namespace std;
void readi(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readll(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readc(char &x) {
  char c;
  while ((c = getchar()) == ' ')
    ;
  x = c;
}
void writes(string s) { puts(s.c_str()); }
void writeln() { writes(""); }
void writei(int x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
void writell(long long x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
int n, i, a[3];
int won[303][303][303];
bool dfs(int x, int y, int z) {
  if (x > y) swap(x, y);
  if (x > z) swap(x, z);
  if (y > z) swap(y, z);
  if (!z) return 0;
  if (n == 3 && x == 0 & y != 0) return (y != z);
  if (won[x][y][z] != -1) return won[x][y][z];
  int i;
  for (i = 0; i < x; i++) {
    if (!dfs(i, y, z)) return won[x][y][z] = 1;
  }
  for (i = 0; i < y; i++) {
    if (!dfs(x, i, z)) return won[x][y][z] = 1;
  }
  for (i = 0; i < z; i++) {
    if (!dfs(x, y, i)) return won[x][y][z] = 1;
  }
  if (n == 3) {
    for (i = 1; i <= x; i++) {
      if (!dfs(x - i, y - i, z - i)) return won[x][y][z] = 1;
    }
  }
  if (n == 2) {
    for (i = 1; i <= y; i++) {
      if (!dfs(x, y - i, z - i)) return won[x][y][z] = 1;
    }
  }
  if (n == 1) {
    for (i = 1; i <= z; i++) {
      if (!dfs(x, y, z - i)) return won[x][y][z] = 1;
    }
  }
  return won[x][y][z] = 0;
}
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  if (n == 3) {
    if (a[0] ^ a[1] ^ a[2])
      cout << "BitLGM";
    else
      cout << "BitAryo";
    return 0;
  }
  memset(won, -1, sizeof(won));
  if (dfs(a[0], a[1], a[2]))
    cout << "BitLGM";
  else
    cout << "BitAryo";
  return 0;
}
