#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n;
  int a[3], dp[305];
  memset(dp, 0, sizeof(dp));
  for (j = i = 1; i + j <= 300; i++)
    if (!dp[i]) {
      dp[i + j] = i, dp[i] = i + j;
      j++;
    }
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n == 1)
    printf("%s\n", a[0] ? "BitLGM" : "BitAryo");
  else if (n == 2)
    printf("%s\n", dp[a[0]] == a[1] ? "BitAryo" : "BitLGM");
  else
    printf("%s\n", a[0] ^ a[1] ^ a[2] ? "BitLGM" : "BitAryo");
  return 0;
}
