#include <bits/stdc++.h>
int a[3];
int dp[323][323];
bool dfs(int a, int b) {
  if (!a && !b) return false;
  int &ret = dp[a][b];
  if (~ret) return ret;
  if (!a && b || !b && a || a == b) return ret = 1;
  for (int x = 1; x <= std::min(a, b); x++)
    if (!dfs(a - x, b - x)) return ret = 1;
  for (int x = 1; x <= a; x++)
    if (!dfs(a - x, b)) return ret = 1;
  for (int x = 1; x <= b; x++)
    if (!dfs(a, b - x)) return ret = 1;
  return ret = 0;
}
bool Go(int n) {
  if (n & 1) return a[0] ^ a[1] ^ a[2];
  return dfs(a[0], a[1]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  memset(dp, -1, sizeof dp);
  puts(Go(n) ? "BitLGM" : "BitAryo");
  return 0;
}
