#include <bits/stdc++.h>
using namespace std;
const int OO = (int)2e9;
const double EPS = 1e-9;
int n;
int nums[3];
int dp[301][301];
int clc(int n1, int n2) {
  if (!n1 && !n2) return 0;
  int &ref = dp[n1][n2];
  if (ref != -1) return ref;
  ref = 0;
  for (int x = 1; x <= n1; x++) ref |= (!clc(n1 - x, n2));
  for (int x = 1; x <= n2; x++) ref |= (!clc(n1, n2 - x));
  for (int x = 1; x <= min(n1, n2); x++) ref |= (!clc(n1 - x, n2 - x));
  return ref;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> nums[i];
  if (n == 1) {
    if (nums[0])
      cout << "BitLGM";
    else
      cout << "BitAryo";
  } else if (n == 3) {
    int ans = nums[0];
    ans ^= nums[1];
    ans ^= nums[2];
    if (ans)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  } else {
    memset(dp, -1, sizeof(dp));
    int ans = clc(nums[0], nums[1]);
    if (ans)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  }
  return 0;
}
