#include <bits/stdc++.h>
using namespace std;
int a[3];
int dp[301][301];
int dfs(int a, int b) {
  if (dp[a][b] != 0) return dp[a][b] - 1;
  int res = 1;
  for (int i = 1; i <= a; i++) res = min(res, dfs(a - i, b));
  for (int i = 1; i <= b; i++) res = min(res, dfs(a, b - i));
  for (int i = 1; i <= min(a, b); i++) res = min(res, dfs(a - i, b - i));
  res = 1 - res;
  dp[a][b] = res + 1;
  return res;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int f = 0;
  if (n == 1) f = a[0];
  if (n == 2) f = dfs(a[0], a[1]);
  if (n == 3) f = a[0] ^ a[1] ^ a[2];
  printf(f ? "BitLGM" : "BitAryo");
  return 0;
}
