#include <bits/stdc++.h>
using namespace std;
int encode2(int a, int b) {
  if (a > b) swap(a, b);
  return a * 301 + b;
}
void decode2(int n, int &a, int &b) {
  a = n / 301;
  b = n % 301;
}
int encode3(int a, int b, int c) {
  if (a > b) swap(a, b);
  if (b > c) swap(b, c);
  if (a > b) swap(a, b);
  return a * 301 * 301 + b * 301 + c;
}
void decode3(int n, int &a, int &b, int &c) {
  a = n / (301 * 301);
  b = n / 301 % 301;
  c = n % 301;
}
char d[301 * 301 * 301] = {2};
int rec2(int n) {
  if (d[n]) return d[n];
  int a, b;
  decode2(n, a, b);
  for (int i = 1; i <= a; i++) {
    if (rec2(encode2(a - i, b - i)) == 2) return d[n] = 1;
    if (rec2(encode2(a - i, b)) == 2) return d[n] = 1;
  }
  for (int i = 1; i <= b; i++) {
    if (rec2(encode2(a, b - i)) == 2) return d[n] = 1;
  }
  return d[n] = 2;
}
int rec3(int n) {
  if (d[n]) return d[n];
  int a, b, c;
  decode3(n, a, b, c);
  for (int i = 1; i <= a; i++) {
    if (rec3(encode3(a - i, b - i, c - i)) == 2) return d[n] = 1;
    if (rec3(encode3(a - i, b, c)) == 2) return d[n] = 1;
  }
  for (int i = 1; i <= b; i++) {
    if (rec3(encode3(a, b - i, c)) == 2) return d[n] = 1;
  }
  for (int i = 1; i <= c; i++) {
    if (rec3(encode3(a, b, c - i)) == 2) return d[n] = 1;
  }
  for (int i = 0; c + i <= 300; i++) {
    d[encode3(a + i, b + i, c + i)] = 1;
    d[encode3(a, b, c + i)] = 1;
  }
  for (int i = 0; b + i <= 300; i++) {
    d[encode3(a, b + i, c)] = 1;
  }
  for (int i = 0; a + i <= 300; i++) {
    d[encode3(a + i, b, c)] = 1;
  }
  return d[n] = 2;
}
int main() {
  int n, v[3] = {};
  cin >> n;
  for (int i = 0; i < n; i++) cin >> v[i];
  if (n == 1) {
    cout << (v[0] ? "BitLGM" : "BitAryo");
  } else if (n == 2) {
    cout << (rec2(encode2(v[0], v[1])) == 1 ? "BitLGM" : "BitAryo");
  } else {
    cout << (rec3(encode3(v[0], v[1], v[2])) == 1 ? "BitLGM" : "BitAryo");
  }
}
