#include <bits/stdc++.h>
using namespace std;
const double fai = (sqrt(5.0) + 1) * 0.5;
bool solve(int a, int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return b != int(a / fai) + a + 1;
}
int main() {
  int n, a[3] = {};
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  if (n == 1) {
    puts(a[0] ? "BitLGM" : "BitAryo");
  } else if (n == 2) {
    puts(solve(a[0], a[1]) ? "BitLGM" : "BitAryo");
  } else {
    puts(a[0] ^ a[1] ^ a[2] ? "BitLGM" : "BitAryo");
  }
  return 0;
}
