#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("-O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
int a[4], dp2[305][305], dp3[305][305][305];
int main() {
  int n, i, j, l, k;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << (a[1] == 0 ? "BitAryo" : "BitLGM");
  } else {
    if (n == 2) {
      for (i = 0; i <= 300; i++) {
        for (j = 0; j <= 300; j++) {
          for (l = 1; l <= 300; l++) {
            if (i + l <= 300) {
              dp2[i + l][j] = max(dp2[i + l][j], 1 - dp2[i][j]);
            }
            if (j + l <= 300) {
              dp2[i][j + l] = max(dp2[i][j + l], 1 - dp2[i][j]);
            }
            if (i + l <= 300 && j + l <= 300) {
              dp2[i + l][j + l] = max(dp2[i + l][j + l], 1 - dp2[i][j]);
            }
          }
        }
      }
      cout << (dp2[a[1]][a[2]] == 1 ? "BitLGM" : "BitAryo");
    } else {
      for (i = 0; i <= a[1]; i++) {
        for (j = 0; j <= a[2]; j++) {
          for (k = 0; k <= a[3]; k++) {
            if (dp3[i][j][k] != 1) {
              for (l = 1; l <= a[1] - i; l++) {
                dp3[i + l][j][k] = max(dp3[i + l][j][k], 1 - dp3[i][j][k]);
              }
              for (l = 1; l <= a[2] - j; l++) {
                dp3[i][j + l][k] = max(dp3[i][j + l][k], 1 - dp3[i][j][k]);
              }
              for (l = 1; l <= a[3] - k; l++) {
                dp3[i][j][k + l] = max(dp3[i][j][k + l], 1 - dp3[i][j][k]);
              }
              for (l = 1;; l++) {
                if (i + l <= a[1] && j + l <= a[2] && k + l <= a[3]) {
                  dp3[i + l][j + l][k + l] =
                      max(dp3[i + l][j + l][k + l], 1 - dp3[i][j][k]);
                } else {
                  break;
                }
              }
            }
          }
        }
      }
      cout << (dp3[a[1]][a[2]][a[3]] == 1 ? "BitLGM" : "BitAryo");
    }
  }
  return 0;
}
