#include <bits/stdc++.h>
using namespace std;
void _fill_int(int* p, int val, int rep) {
  int i;
  for (i = 0; i < rep; i++) p[i] = val;
}
int GETi() {
  int i;
  scanf("%d", &i);
  return i;
}
template <class T>
T sqr(T val) {
  return val * val;
}
int N;
int A[5];
int memo[301][301];
int memo2[301][301][301];
int win2(int A, int B) {
  if (memo[A][B] >= 0) return memo[A][B];
  if (A == 0 && B == 0) return memo[A][B] = 0;
  if (A == 0 || B == 0) return memo[A][B] = 1;
  int i;
  for (i = min(A, B); i > 0; i--)
    if (win2(A - i, B - i) == 0) return memo[A][B] = 1;
  for (i = A; i > 0; i--)
    if (win2(A - i, B) == 0) return memo[A][B] = 1;
  for (i = B; i > 0; i--)
    if (win2(A, B - i) == 0) return memo[A][B] = 1;
  return memo[A][B] = 0;
}
int win3(int A, int B, int C) {
  if (memo2[A][B][C] >= 0) return memo2[A][B][C];
  int i;
  for (i = C; i > 0; i--)
    if (win3(A - i, B - i, C - i) == 0) return memo2[A][B][C] = 1;
  return memo2[A][B][C] = ((A ^ B ^ C) != 0);
}
void solve() {
  int i, j, k, x, y;
  N = GETi();
  for (i = 0; i < N; i++) A[i] = GETi();
  sort(A, A + N);
  reverse(A, A + N);
  _fill_int((int*)memo, -1, sizeof(memo) / 4);
  _fill_int((int*)memo2, -1, sizeof(memo2) / 4);
  if (N == 1)
    printf(A[0] ? "BitLGM\n" : "BitAryo\n");
  else if (N == 2)
    printf(win2(A[0], A[1]) ? "BitLGM\n" : "BitAryo\n");
  else
    printf(win3(A[0], A[1], A[2]) ? "BitLGM\n" : "BitAryo\n");
  return;
}
int main(int argc, char** argv) {
  if (argc > 1) freopen(argv[1], "r", stdin);
  solve();
  return 0;
}
