#include <bits/stdc++.h>
using namespace std;
const int N = 5065;
int s[N], w, x, y, z;
int work(int x, int d, int *s) {
  int *g, i, j, t;
  g = new int[N];
  if (x == (x & (-x))) {
    memset(g, -1, sizeof(g));
    for (i = x << 1, j = 0; i < N; i++, j++) {
      if (j >= x << 1) j -= x << 1;
      if (j < x || x == 0) g[i] = i + x;
    }
  } else {
    work(x - (x & (-x)), (x & (-x)), g);
  }
  if (d > 0) {
    for (i = 0; i + 2 * d < N; i += 2 * d) {
      for (j = i; j < i + d; j++) {
        t = g[j], g[j] = g[j + d], g[j + d] = t;
      }
    }
  }
  memcpy(s, g, sizeof(int) * N);
  return 0;
}
int a[3];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  if (n == 3) {
    sort(a, a + 3);
    work(a[0], 0, s);
    if (s[a[1]] != a[2])
      puts("BitLGM");
    else
      puts("BitAryo");
  } else if (n == 2) {
    sort(a, a + 2);
    int m = a[0], n = a[1];
    int k = n - m;
    int data = floor(k * (1.0 + sqrt(5.0)) / 2.0);
    if (data != m)
      puts("BitLGM");
    else
      puts("BitAryo");
  } else {
    if (a[0] != 0)
      puts("BitLGM");
    else
      puts("BitAryo");
  }
  return 0;
}
