#include <bits/stdc++.h>
using namespace std;
void kehsihba() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
string a = "BitLGM";
string b = "BitAryo";
void solve() {
  long long n, s = 0;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    s ^= arr[i];
  }
  if (n % 2) {
    cout << ((!s) ? b : a);
    return;
  }
  cout << ((min(arr[0], arr[1]) ==
            (long long)(1.61803398874989484820458683436564 *
                        abs(arr[0] - arr[1])))
               ? b
               : a);
}
int32_t main() {
  kehsihba();
  long long t = 1;
  for (long long k = 1; k <= t; k++) {
    solve();
  }
}
