#include <bits/stdc++.h>
using namespace std;
const int MX = 1000;
bool w[MX][MX];
int main() {
  std::ios::sync_with_stdio(false);
  int n, winner = 0;
  cin >> n;
  if (n == 1) {
    int a;
    cin >> a;
    if (a) winner = 1;
  } else if (n == 2) {
    int x, y;
    cin >> x >> y;
    for (int i = 0; i <= x; i++)
      for (int j = 0; j <= y; j++) {
        for (int k = 1; k <= max(i, j); k++) {
          if (k <= i && k <= j)
            if (!w[i - k][j - k]) w[i][j] = true;
          if (k <= i)
            if (!w[i - k][j]) w[i][j] = true;
          if (k <= j)
            if (!w[i][j - k]) w[i][j] = true;
        }
      }
    if (w[x][y]) winner = 1;
  } else {
    int x, y, z;
    cin >> x >> y >> z;
    if (x ^ y ^ z) winner = 1;
  }
  if (winner)
    cout << "BitLGM" << endl;
  else
    cout << "BitAryo" << endl;
  return 0;
}
