#include <bits/stdc++.h>
using namespace std;
bitset<(301) * (301) * (301) * 5> cn, dp;
int A[3], N;
void swp(int a, int b, int* B, int& p) {
  swap(B[a], B[b]);
  if (p == a)
    p = b;
  else if (p == b)
    p = a;
}
bool dyn(int* C, int p) {
  int x = 0, B[3];
  for (int i(0); i < 3; i++) B[i] = C[i];
  if (N > 1 && *B > B[1]) swp(0, 1, B, p);
  if (N > 2 && B[1] > B[2]) swp(1, 2, B, p);
  if (N > 1 && *B > B[1]) swp(0, 1, B, p);
  for (int i(0); i < N; i++) x += !!B[i];
  bool v = 0;
  if (!x) return p != 4;
  if (cn[(5 * (301) * (301) * *B + 5 * (301) * B[1] + 5 * B[2] + p)])
    return dp[(5 * (301) * (301) * *B + 5 * (301) * B[1] + 5 * B[2] + p)];
  ;
  cn[(5 * (301) * (301) * *B + 5 * (301) * B[1] + 5 * B[2] + p)] = 1;
  if (p == 4) {
    for (int i(0); i < N; i++)
      if (B[i]) --B[i], v |= dyn(B, i), ++B[i];
    if (x == N) {
      for (int i(0); i < N; i++) --B[i];
      v |= dyn(B, 3);
      for (int i(0); i < N; i++) ++B[i];
    }
  } else {
    v |= !dyn(B, 4);
    if (p < N) {
      if (B[p]) --B[p], v |= dyn(B, p), ++B[p];
    } else if (x == N) {
      for (int i(0); i < N; i++) --B[i];
      v |= dyn(B, 3);
      for (int i(0); i < N; i++) ++B[i];
    }
  }
  dp[(5 * (301) * (301) * *B + 5 * (301) * B[1] + 5 * B[2] + p)] = v;
  return v;
}
int main() {
  scanf("%d", &N);
  for (int i(0); i < N; i++) scanf("%d", A + i);
  puts(dyn(A, 4) ? "BitLGM" : "BitAryo");
}
