#include <bits/stdc++.h>
using namespace std;
int n;
int a[4];
bool w[306][306];
string s = "BitLGM";
string t = "BitAryo";
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 1) {
    if (a[0] == 0)
      cout << t << endl;
    else
      cout << s << endl;
  } else if (n == 3) {
    if ((a[0] ^ a[1] ^ a[2]) == 0)
      cout << t << endl;
    else
      cout << s << endl;
  } else {
    for (int i = 1; i <= a[0]; i++) w[i][0] = 1;
    for (int i = 1; i <= a[1]; i++) w[0][i] = 1;
    for (int i = 1; i <= a[0]; i++)
      for (int j = 1; j <= a[1]; j++) {
        for (int k = 1; k <= max(a[0], a[1]); k++) {
          if (k <= j) w[i][j] |= (!w[i][j - k]);
          if (k <= i) w[i][j] |= (!w[i - k][j]);
          if (k <= i && k <= j) w[i][j] |= (!w[i - k][j - k]);
        }
      }
    if (w[a[0]][a[1]])
      cout << s << endl;
    else
      cout << t << endl;
  }
  return 0;
}
