#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int inf = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
const double PI = acos(-1);
long long int i, j, k;
void solve(void);
inline bool equal(double a, double b) { return fabs(a - b) < eps; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(10);
  int t = 1;
  while (t--) solve();
  return 0;
}
int n, a[5], dp2[305][305], dp3[305][305][305];
bool calc2(bool turn) {
  int i;
  if (a[1] == 0 && a[2] == 0) return dp2[a[1]][a[2]] = 0;
  if (dp2[a[1]][a[2]] != -1) return dp2[a[1]][a[2]];
  bool val = 0;
  int minn = ((a[1]) < (a[2]) ? (a[1]) : (a[2]));
  for (i = (1); i <= (minn); ++i) {
    a[1] -= i;
    a[2] -= i;
    val |= (!calc2(turn ^ 1));
    a[1] += i;
    a[2] += i;
  }
  for (i = (1); i <= (a[1]); ++i) {
    a[1] -= i;
    val |= (!calc2(turn ^ 1));
    a[1] += i;
  }
  for (i = (1); i <= (a[2]); ++i) {
    a[2] -= i;
    val |= (!calc2(turn ^ 1));
    a[2] += i;
  }
  return dp2[a[1]][a[2]] = val;
}
int calc3(bool turn) {
  int i;
  if (a[1] == 0 && a[2] == 0 && a[3] == 0) return dp3[a[1]][a[2]][a[3]] = 0;
  if (dp3[a[1]][a[2]][a[3]] != -1) return dp3[a[1]][a[2]][a[3]];
  bool val = 0;
  int minn = ((a[1]) < (((a[2]) < (a[3]) ? (a[2]) : (a[3])))
                  ? (a[1])
                  : (((a[2]) < (a[3]) ? (a[2]) : (a[3]))));
  for (i = (1); i <= (minn); ++i) {
    a[1] -= i;
    a[2] -= i;
    a[3] -= i;
    val |= (!calc3(turn ^ 1));
    a[1] += i;
    a[2] += i;
    a[3] += i;
  }
  for (i = (1); i <= (a[1]); ++i) {
    a[1] -= i;
    val |= (!calc3(turn ^ 1));
    a[1] += i;
  }
  for (i = (1); i <= (a[2]); ++i) {
    a[2] -= i;
    val |= (!calc3(turn ^ 1));
    a[2] += i;
  }
  for (i = (1); i <= (a[3]); ++i) {
    a[3] -= i;
    val |= (!calc3(turn ^ 1));
    a[3] += i;
  }
  return dp3[a[1]][a[2]][a[3]] = val;
}
void solve() {
  cin >> n;
  for (i = (1); i <= (n); ++i) cin >> a[i];
  memset(dp2, -1, sizeof(dp2));
  memset(dp3, -1, sizeof(dp3));
  if (n == 1) {
    if (a[1] > 0)
      cout << "BitLGM\n";
    else
      cout << "BitAryo\n";
  } else if (n == 2) {
    if (calc2(0))
      cout << "BitLGM\n";
    else
      cout << "BitAryo\n";
  } else if (n == 3) {
    if ((a[1] ^ a[2] ^ a[3]) != 0)
      cout << "BitLGM\n";
    else
      cout << "BitAryo\n";
  }
}
