#include <bits/stdc++.h>
int f[610][610];
int a[5];
int n;
void out(bool sig) {
  if (sig)
    puts("BitAryo");
  else
    puts("BitLGM");
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  if (n == 1) out(a[1] == 0);
  if (n == 2) {
    memset(f, 1, sizeof(f));
    for (int i = (0); i <= (a[1]); i++)
      for (int j = (0); j <= (a[2]); j++)
        if (f[i][j])
          for (int k = (1); k <= (300); k++)
            f[i + k][j] = f[i][j + k] = f[i + k][j + k] = false;
    out(f[a[1]][a[2]]);
  }
  if (n == 3) out(!(a[1] ^ a[2] ^ a[3]));
  return 0;
}
