#include <bits/stdc++.h>
const double eps = 1e-19;
const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const int MAXN = 301;
using namespace std;
int n;
int mem[MAXN][MAXN][MAXN];
int a[3];
void add(int k1, int k2, int k3) {
  for (int i = k1 + 1; i < MAXN; i++) mem[i][k2][k3] = 1;
  for (int i = k2 + 1; i < MAXN; i++) mem[k1][i][k3] = 1;
  for (int i = k3 + 1; i < MAXN; i++) mem[k1][k2][i] = 1;
  for (int i = 1; i < MAXN - max(k1, max(k2, k3)); i++)
    if (n == 2)
      mem[k1 + i][k2 + i][k3] = 1;
    else
      mem[k1 + i][k2 + i][k3 + i] = 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  reverse(a, a + n);
  for (int i = 0; i <= a[0]; i++) {
    for (int j = 0; j <= a[1]; j++) {
      for (int l = 0; l <= a[2]; l++)
        if (!mem[i][j][l]) add(i, j, l);
    }
  }
  if (mem[a[0]][a[1]][a[2]])
    printf("BitLGM");
  else
    printf("BitAryo");
  return 0;
}
