#include <bits/stdc++.h>
using namespace std;
int temp, i, j, k, T;
long long pow_r(long long d, long long n) {
  long long x = 1ll;
  while (n > 0) {
    if (n & 1) x = (x * d);
    d = (d * d);
    n >>= 1;
  }
  return x;
}
int n, a[4];
int dp[303][303][303], dp2[303][303];
int getit2(int a, int b) {
  if (dp2[a][b] != -1) return dp2[a][b];
  int &ret = dp2[a][b];
  if (a == 0 && b == 0) return ret = 0;
  int mn = min(a, b) + 1;
  int i;
  for (i = 1; i < mn; ++i)
    if (getit2(a - i, b - i) == 0) return ret = 1;
  for (i = 0; i < a; ++i)
    if (getit2(i, b) == 0) return ret = 1;
  for (i = 0; i < b; ++i)
    if (getit2(a, i) == 0) return ret = 1;
  return ret = 0;
}
int getit(int a, int b, int c) {
  if (a ^ b ^ c)
    return 1;
  else
    return 0;
  if (dp[a][b][c] != -1) return dp[a][b][c];
  int &ret = dp[a][b][c];
  if (a == 0 && b == 0 && c == 0) return ret = 0;
  int mn = min(a, min(b, c)) + 1;
  int i;
  for (i = 1; i < mn; ++i)
    if (getit(a - mn, b - mn, c - mn) == 0) return ret = 1;
  for (i = 0; i < a; ++i)
    if (getit(i, b, c) == 0) return ret = 1;
  for (i = 0; i < b; ++i)
    if (getit(a, i, c) == 0) return ret = 1;
  for (i = 0; i < c; ++i)
    if (getit(a, b, i) == 0) return ret = 1;
  return ret = 0;
}
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[0])
      puts("BitLGM");
    else
      puts("BitAryo");
    return 0;
  }
  if (n == 2) {
    memset(dp2, -1, sizeof(dp2));
    if (getit2(a[0], a[1]) == 1)
      puts("BitLGM");
    else
      puts("BitAryo");
    return 0;
  }
  if (n == 3) {
    memset(dp, -1, sizeof(dp));
    if (getit(a[0], a[1], a[2]) == 1)
      puts("BitLGM");
    else
      puts("BitAryo");
  }
  return 0;
}
