#include <bits/stdc++.h>
using namespace std;
int n;
int dp[301][301];
int a[3];
int Game(int x, int y) {
  if (x == 0 && y == 0) return 0;
  if (x > y) swap(x, y);
  int &res = dp[x][y];
  if (res != -1) return res;
  for (int i = 1; i <= x; ++i) {
    if (!Game(x - i, y - i)) return res = 1;
  }
  for (int i = 1; i <= x; ++i) {
    if (!Game(x - i, y)) return res = 1;
  }
  for (int i = 1; i <= y; ++i) {
    if (!Game(x, y - i)) return res = 1;
  }
  return res = 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[0])
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
  } else if (n == 2) {
    memset(dp, -1, sizeof(dp));
    if (Game(a[0], a[1]))
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
  } else if (n == 3) {
    int t = a[0] ^ a[1] ^ a[2];
    if (t == 0)
      printf("BitAryo\n");
    else
      printf("BitLGM\n");
  }
  return 0;
}
