#include <bits/stdc++.h>
using namespace std;
mt19937 rng(time(0));
uniform_int_distribution<int> uid(-1e9, 1e9);
int d[303][303];
int rec(int x, int y) {
  if (d[x][y]) return d[x][y];
  d[x][y] = 2;
  for (int i = 1; i <= x; ++i) {
    int r = rec(x - i, y);
    if (r == 2) return d[x][y] = 1;
  }
  for (int i = 1; i <= y; ++i) {
    int r = rec(x, y - i);
    if (r == 2) return d[x][y] = 1;
  }
  for (int i = 1; i <= min((x ? x : 400), (y ? y : 400)); ++i) {
    int r = rec(max(x - i, 0), max(y - i, 0));
    if (r == 2) return d[x][y] = 1;
  }
  return d[x][y];
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v(3, 0);
  for (int i = 0; i < n; ++i) cin >> v[i];
  d[0][0] = 2;
  cout << ((n == 2 && rec(v[0], v[1]) == 1) || (n != 2 && (v[0] ^ v[1] ^ v[2]))
               ? "BitLGM"
               : "BitAryo")
       << '\n';
}
