#include <bits/stdc++.h>
using namespace std;
bool b[333][333][333], c[333][333];
int main() {
  int n, x, y, z;
  string fir = "BitLGM", sec = "BitAryo";
  while (cin >> n) {
    if (n == 1) {
      cin >> x;
      if (x == 0)
        cout << sec;
      else
        cout << fir;
    } else if (n == 2) {
      cin >> x >> y;
      for (int i = 0; i <= x; i++)
        for (int j = 0; j <= y; j++)
          if (!c[i][j]) {
            for (int k = 1; k <= min(x - i, y - j); k++) c[i + k][j + k] = true;
            for (int k = 1; k <= x - i; k++) c[i + k][j] = true;
            for (int k = 1; k <= y - j; k++) c[i][j + k] = true;
          }
      if (c[x][y])
        cout << fir;
      else
        cout << sec;
    } else {
      cin >> x >> y >> z;
      for (int i = 0; i <= x; i++)
        for (int j = 0; j <= y; j++)
          for (int g = 0; g <= z; g++)
            if (!b[i][j][g]) {
              for (int k = 1; k <= min(min(x - i, y - j), z - g); k++)
                b[i + k][j + k][g + k] = true;
              for (int k = 1; k <= x - i; k++) b[i + k][j][g] = true;
              for (int k = 1; k <= y - j; k++) b[i][j + k][g] = true;
              for (int k = 1; k <= z - g; k++) b[i][j][g + k] = true;
            }
      if (b[x][y][z])
        cout << fir;
      else
        cout << sec;
    }
  }
  return 0;
}
