#include <bits/stdc++.h>
using namespace std;
int vis[303][303] = {0};
int dfs(int x, int y) {
  if (vis[x][y] >= 0) return vis[x][y];
  int res = 0;
  int check[1011] = {0};
  for (int i = 1; i <= x; i++) check[dfs(x - i, y)] = 1;
  for (int i = 1; i <= y; i++) check[dfs(x, y - i)] = 1;
  for (int i = 1; i <= min(x, y); i++) check[dfs(x - i, y - i)] = 1;
  while (check[res]) res++;
  return vis[x][y] = res;
}
int main() {
  int n;
  while (scanf("%d", &n) > 0) {
    int a[4] = {0};
    memset(vis, -1, sizeof(vis));
    vis[0][0] = 0;
    for (int i = 0; i < n; i++) scanf("%d", a + i);
    if (n == 1)
      puts(a[0] ? "BitLGM" : "BitAryo");
    else if (n == 2) {
      int xx = dfs(a[0], a[1]);
      puts(xx ? "BitLGM" : "BitAryo");
    } else {
      int xx = a[0] ^ a[1] ^ a[2];
      puts(xx ? "BitLGM" : "BitAryo");
    }
  }
  return 0;
}
