#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[4];
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (n & 1) {
    int tmp = 0;
    for (int i = 1; i <= n; i++) tmp = tmp ^ a[i];
    if (tmp)
      puts("BitLGM");
    else
      puts("BitAryo");
  } else {
    if (a[1] > a[2]) swap(a[1], a[2]);
    int k = a[2] - a[1];
    int x = k * (1.0 + sqrt(5.0)) / 2;
    if (x == a[1])
      puts("BitAryo");
    else
      puts("BitLGM");
  }
  return 0;
}
