#include <bits/stdc++.h>
using namespace std;
long long n, f[305][305];
long long dp(long long x, long long y) {
  if (x == 0 && y == 0) return 0;
  if (f[x][y] > -1) return f[x][y];
  for (long long i = x - 1; i >= 0; i--)
    if (!dp(i, y)) return f[x][y] = 1;
  for (long long i = y - 1; i >= 0; i--)
    if (!dp(x, i)) return f[x][y] = 1;
  for (long long i = 1; i <= min(x, y); i++)
    if (!dp(x - i, y - i)) return f[x][y] = 1;
  return f[x][y] = 0;
}
signed main() {
  cin >> n;
  if (n == 1) {
    long long x;
    cin >> x;
    puts(x ? "BitLGM" : "BitAryo");
  } else if (n == 2) {
    memset(f, -1, sizeof(f));
    long long x, y;
    cin >> x >> y;
    puts(dp(x, y) ? "BitLGM" : "BitAryo");
  } else if (n == 3) {
    long long x, y, z;
    cin >> x >> y >> z;
    long long g = x ^ y ^ z;
    puts(g ? "BitLGM" : "BitAryo");
  }
  return 0;
}
