#include <bits/stdc++.h>
using namespace std;
const int N = 310;
int w[N][N], a[5];
int dfs(int x, int y) {
  if (y < x) swap(x, y);
  if (w[x][y] != -1) return w[x][y];
  for (int i = 1; i <= x; i++) {
    if (dfs(x - i, y) == 0) return w[x][y] = 1;
    if (dfs(x - i, y - i) == 0) return w[x][y] = 1;
  }
  for (int i = 1; i <= y; i++) {
    if (dfs(x, y - i) == 0) return w[x][y] = 1;
  }
  return w[x][y] = 0;
}
int main() {
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) w[i][j] = -1;
  w[0][0] = 0;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n == 1) {
    if (a[0] != 0)
      puts("BitLGM");
    else
      puts("BitAryo");
  } else if (n == 2) {
    if (dfs(a[0], a[1]) == 0)
      puts("BitAryo");
    else
      puts("BitLGM");
  } else {
    int now = a[0] ^ a[1] ^ a[2];
    if (now != 0)
      puts("BitLGM");
    else
      puts("BitAryo");
  }
  return 0;
}
