#include <bits/stdc++.h>
using namespace std;
const double eps = 10e-9;
const int MOD = 1000000007;
const int INF = MOD;
short a[301][301][301];
bool d[302][302][302][4];
int b[301][301];
bool isWin(short x, short y);
int depth = 0;
int max_depth = 0;
void isWin(short x, short y, short z) {
  if (a[x][y][z] != -1) return;
  int win = 0;
  if (x * y * z != 0) {
    isWin(x - 1, y - 1, z - 1);
    win |= d[x - 1][y - 1][z - 1][0];
  }
  if (x > 0) {
    isWin(x - 1, y, z);
    win |= d[x - 1][y][z][1];
  }
  if (y > 0) {
    isWin(x, y - 1, z);
    win |= d[x][y - 1][z][2];
  }
  if (z > 0) {
    isWin(x, y, z - 1);
    win |= d[x][y][z - 1][3];
  }
  a[x][y][z] = a[x][z][y] = a[y][x][z] = a[y][z][x] = a[z][x][y] = a[z][y][x] =
      win;
  if (x && y && z)
    d[x][y][z][0] = d[x - 1][y - 1][z - 1][0] || (win == 0);
  else
    d[x][y][z][0] = (win == 0);
  d[x][z][y][0] = d[y][x][z][0] = d[y][z][x][0] = d[z][x][y][0] =
      d[z][y][x][0] = d[x][y][z][0];
  if (x) {
    d[x][y][z][1] = d[x - 1][y][z][1] || (win == 0);
  } else
    d[x][y][z][1] = (win == 0);
  d[x][z][y][1] = d[y][x][z][2] = d[y][z][x][3] = d[z][x][y][2] =
      d[z][y][x][3] = d[x][y][z][1];
  if (y) {
    d[x][y][z][2] = d[x][y - 1][z][2] || (win == 0);
  } else
    d[x][y][z][2] = (win == 0);
  d[x][z][y][3] = d[y][x][z][1] = d[y][z][x][1] = d[z][x][y][3] =
      d[z][y][x][2] = d[x][y][z][2];
  if (z) {
    d[x][y][z][3] = d[x][y][z - 1][3] || (win == 0);
  } else
    d[x][y][z][3] = (win == 0);
  d[x][z][y][2] = d[y][x][z][3] = d[y][z][x][2] = d[z][x][y][1] =
      d[z][y][x][1] = d[x][y][z][3];
  return;
}
bool isWin(short x, short y) {
  if (b[x][y] != -1) return b[x][y];
  bool win = false;
  for (int i = 0; i < x && !win; i++) win |= !isWin(i, y);
  for (int i = 0; i < y && !win; i++) win |= !isWin(x, i);
  int up = min(x, y);
  for (int i = up; i >= 1 && !win; i--) win |= !isWin(x - i, y - i);
  return b[x][y] = b[y][x] = win;
}
int in[3];
int main() {
  std::ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n == 1) {
    cin >> in[0];
    cout << (in[0] != 0 ? "BitLGM" : "BitAryo") << endl;
    exit(0);
  }
  for (int i = 0; i < n; i++) cin >> in[i];
  memset(a, -1, sizeof(a));
  memset(b, -1, sizeof(b));
  a[0][0][0] = 0;
  b[0][0] = 0;
  a[0][0][0] = 0;
  if (n == 2)
    cout << (isWin(in[0], in[1]) ? "BitLGM" : "BitAryo") << endl;
  else {
    isWin(in[2], in[1], in[0]);
    cout << (a[in[2]][in[1]][in[0]] ? "BitLGM" : "BitAryo") << endl;
  }
  return 0;
}
