#include <bits/stdc++.h>
using namespace std;
int main() {
  double t1 = (1.0 + sqrt(5.0)) / 2;
  int a, b, k, c;
  int n;
  scanf("%d", &n);
  if (n == 1) {
    scanf("%d", &a);
    if (a > 0)
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
    return 0;
  }
  if (n == 2) {
    scanf("%d%d", &a, &b);
    if (a > b) {
      a ^= b;
      b ^= a;
      a ^= b;
    }
    k = b - a;
    if (a == (int)(k * t1))
      printf("BitAryo\n");
    else
      printf("BitLGM\n");
    return 0;
  }
  if (n == 3) {
    int ans;
    scanf("%d%d%d", &a, &b, &c);
    ans = a ^ b ^ c;
    if (ans == 0)
      cout << "BitAryo" << endl;
    else
      cout << "BitLGM" << endl;
  }
  return 0;
}
