#include <bits/stdc++.h>
using namespace std;
int dp[301][301][301];
int main() {
  int n, a, b, c;
  scanf("%d", &n);
  if (n == 1) {
    scanf("%d", &a);
    if (a != 0)
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
  } else if (n == 2) {
    scanf("%d %d", &a, &b);
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i <= a; i++)
      for (int j = 0; j <= b; j++)
        if (dp[i][j][0] == 0) {
          for (int x = 1; i + x <= a; x++) dp[i + x][j][0] = 1;
          for (int x = 1; j + x <= b; x++) dp[i][j + x][0] = 1;
          for (int x = 1; (x + i <= a && x + j <= b); x++)
            dp[i + x][j + x][0] = 1;
        }
    if (dp[a][b][0])
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
  } else {
    scanf("%d %d %d", &a, &b, &c);
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i <= a; i++)
      for (int j = 0; j <= b; j++)
        for (int k = 0; k <= c; k++)
          if (dp[i][j][k] == 0) {
            for (int x = 1; i + x <= a; x++) dp[i + x][j][k] = 1;
            for (int x = 1; j + x <= b; x++) dp[i][j + x][k] = 1;
            for (int x = 1; k + x <= c; x++) dp[i][j][k + x] = 1;
            for (int x = 1; (x + i <= a && x + j <= b && x + k <= c); x++)
              dp[i + x][j + x][k + x] = 1;
          }
    if (dp[a][b][c])
      printf("BitLGM\n");
    else
      printf("BitAryo\n");
  }
  return 0;
}
