#include <bits/stdc++.h>
using namespace std;
void gt(int &a, int b) {
  if (a < b) a = b;
}
string n2s(int a) {
  stringstream ss;
  ss << a;
  return ss.str();
}
int d3[301][301][301]{0}, d2[301][301];
int main() {
  int n, ans, a, b, c;
  cin >> n;
  if (n == 1) {
    cin >> a;
    ans = a > 0;
  } else if (n == 2) {
    for (int i = 0; i <= 300; i++)
      for (int j = 0; j <= 300; j++) {
        if (d2[i][j]) continue;
        for (int ii = i + 1; ii <= 300; ii++) d2[ii][j] = 1;
        for (int jj = j + 1; jj <= 300; jj++) d2[i][jj] = 1;
        for (int t = 1; t <= min(300 - i, 300 - j); t++) d2[i + t][j + t] = 1;
      }
    cin >> a >> b;
    ans = d2[a][b];
  } else if (n == 3) {
    for (int i = 0; i <= 300; i++)
      for (int j = 0; j <= 300; j++)
        for (int k = 0; k <= 300; k++) {
          if (d3[i][j][k]) continue;
          for (int ii = i + 1; ii <= 300; ii++) d3[ii][j][k] = 1;
          for (int jj = j + 1; jj <= 300; jj++) d3[i][jj][k] = 1;
          for (int kk = k + 1; kk <= 300; kk++) d3[i][j][kk] = 1;
          for (int t = 1; t <= min(300 - i, min(300 - j, 300 - k)); t++)
            d3[i + t][j + t][k + t] = 1;
        }
    cin >> a >> b >> c;
    ans = d3[a][b][c];
  }
  ans ? cout << "BitLGM" : cout << "BitAryo";
  return 0;
}
