#include <bits/stdc++.h>
using namespace std;
int dp[310][310][310];
int Stones[3];
int dp2[310][310];
int calc(int mini, int diff1, int diff2) {
  if (mini + diff1 + diff2 == 0) return 0;
  int &Res = dp[mini][diff1][diff2];
  if (Res == -1) {
    Res = 0;
    if (mini == 0) {
      return diff1 ^ diff2;
    }
    for (int i = 1; i <= mini; i++) {
      Res |= (1 - calc(mini - i, diff1 + i, diff2 + i));
      Res |= (1 - calc(mini - i, diff1, diff2));
    }
    for (int i = 1; i <= diff1; i++) {
      Res |= (1 - calc(mini, diff1 - i, diff2));
    }
    for (int i = 1; i <= diff2; i++) {
      if (diff2 - i < diff1)
        Res |= (1 - calc(mini, diff2 - i, diff1));
      else
        Res |= (1 - calc(mini, diff1, diff2 - i));
    }
    for (int i = diff1 + 1; i <= mini + diff1; i++) {
      int val1 = i - diff1;
      int val2 = mini + diff2 - (mini + diff1 - i);
      Res |= (1 - calc(mini + diff1 - i, val1, val2));
    }
    for (int i = diff2 + 1; i <= mini + diff2; i++) {
      int val1 = i - diff2;
      int val2 = mini + diff1 - (mini + diff2 - i);
      Res |= (1 - calc(mini + diff2 - i, val1, val2));
    }
  }
  return Res;
}
int Calc(int mini, int diff) {
  if (mini + diff == 0) return 0;
  int &Res = dp2[mini][diff];
  if (Res == -1) {
    Res = 0;
    for (int i = 1; i <= mini; i++) {
      Res |= (1 - Calc(mini - i, diff + i));
      Res |= (1 - Calc(mini - i, diff));
    }
    for (int i = 1; i <= diff; i++) Res |= (1 - Calc(mini, diff - i));
    for (int i = diff + 1; i <= mini + diff; i++)
      Res |= (1 - Calc(mini + diff - i, i - diff));
  }
  return Res;
}
int main() {
  int N;
  cin >> N;
  memset(Stones, 0, sizeof(Stones));
  for (int i = 0; i < N; i++) {
    cin >> Stones[i];
  }
  if (N == 1) {
    if (Stones[0])
      cout << "BitLGM" << endl;
    else
      cout << "BitAryo" << endl;
    return 0;
  } else if (N == 2) {
    sort(Stones, Stones + 2);
    memset(dp2, -1, sizeof(dp2));
    if (Calc(Stones[0], Stones[1] - Stones[0])) {
      cout << "BitLGM" << endl;
    } else
      cout << "BitAryo" << endl;
    return 0;
  }
  sort(Stones, Stones + 3);
  if ((Stones[0] ^ Stones[1] ^ Stones[2])) {
    cout << "BitLGM" << endl;
  } else
    cout << "BitAryo" << endl;
}
