#include <bits/stdc++.h>
using namespace std;
int a[5];
map<int, int> mp;
void getwz() {
  int ak, bk = 0;
  for (int k = 0; bk <= 300; k++) {
    ak = int(k * (1 + sqrt(5.0)) / 2);
    bk = ak + k;
    mp[ak] = bk;
  }
}
bool judgewz(int x, int y) {
  if (x > y) swap(x, y);
  if (mp[x] == y) return 0;
  return 1;
}
int res[301][301][301];
int getres(int x, int y, int z) {
  if (res[x][y][z] != -1) return res[x][y][z];
  if (x == 0 && y == 0 || x == 0 && z == 0 || y == 0 && z == 0)
    return res[x][y][z] = 1;
  if ((x ^ y ^ z) != 0) return res[x][y][z] = 1;
  return res[x][y][z] = 0;
}
int main() {
  int n;
  memset(res, -1, sizeof(res));
  getwz();
  res[0][0][0] = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[0])
      puts("BitLGM");
    else
      puts("BitAryo");
  }
  if (n == 2) {
    if (judgewz(a[0], a[1]))
      puts("BitLGM");
    else
      puts("BitAryo");
  }
  if (n == 3) {
    if (getres(a[0], a[1], a[2]))
      puts("BitLGM");
    else
      puts("BitAryo");
  }
}
