#include <bits/stdc++.h>
using namespace std;
const int maxn = 300 + 10;
int w[maxn][maxn][maxn];
int a[maxn];
int n;
bool win(int a, int b, int c) {
  if (n < 2) b = 0;
  if (n < 3) c = 0;
  if (w[a][b][c] != -1) return (w[a][b][c] == 1 ? true : false);
  if (a == 0 and b == 0 and c == 0) {
    w[a][b][c] = 0;
    return false;
  }
  int min_ = a;
  if (n > 1) min_ = min(min_, b);
  if (n > 2) min_ = min(min_, c);
  for (int i = 1; i <= min_; i++)
    if (win(a - i, b - i, c - i) == false) {
      w[a][b][c] = 1;
      return true;
    }
  for (int i = 1; i <= a; i++)
    if (win(a - i, b, c) == false) {
      w[a][b][c] = 1;
      return true;
    }
  for (int i = 1; i <= b; i++)
    if (win(a, b - i, c) == false) {
      w[a][b][c] = 1;
      return true;
    }
  for (int i = 1; i <= c; i++)
    if (win(a, b, c - i) == false) {
      w[a][b][c] = 1;
      return true;
    }
  w[a][b][c] = 0;
  return false;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 3)
    cout << (a[0] ^ a[1] ^ a[2] ? "BitLGM" : "BitAryo") << endl;
  else {
    memset(w, -1, sizeof w);
    cout << (win(a[0], a[1], a[2]) ? "BitLGM" : "BitAryo") << endl;
  }
  return 0;
}
