#include <bits/stdc++.h>
using namespace std;
const int maxN = 3 * 100 + 1, mod = (int)1e9 + 7;
bool mark[maxN][maxN][maxN], markk[maxN][maxN];
bool win[maxN][maxN][maxN], winn[maxN][maxN];
bool fu(int x, int y, int z) {
  if (mark[x][y][z] == 1)
    return win[x][y][z];
  else {
    mark[x][y][z] = 1;
    for (int i = x - 1; i >= 0; --i)
      if (fu(i, y, z) == 1) return 0;
    for (int i = y - 1; i >= 0; --i)
      if (fu(x, i, z) == 1) return 0;
    for (int i = z - 1; i >= 0; --i)
      if (fu(x, y, i) == 1) return 0;
    for (int i = 1; i < min(min(x, y), z) + 1; ++i)
      if (fu(x - i, y - i, z - i) == 1) return 0;
    win[x][y][z] = 1;
    return 1;
  }
}
bool fuu(int x, int y) {
  if (markk[x][y] == 1)
    return winn[x][y];
  else {
    markk[x][y] = 1;
    for (int i = x - 1; i >= 0; --i)
      if (fuu(i, y) == 1) return 0;
    for (int i = y - 1; i >= 0; --i)
      if (fuu(x, i) == 1) return 0;
    for (int i = 1; i < min(x, y) + 1; ++i)
      if (fuu(x - i, y - i) == 1) return 0;
    winn[x][y] = 1;
    return 1;
  }
}
int main(void) {
  ios_base::sync_with_stdio(0);
  int n, x1, y1, z1;
  cin >> n;
  if (n == 1) {
    cin >> x1;
    if (x1 != 0)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  }
  if (n == 2) {
    for (int i = 0; i < maxN; ++i) {
      for (int j = 0; j < maxN; ++j) {
        if (markk[i][j] == 0) {
          for (int p = i + 1; p < maxN; ++p) markk[p][j] = 1;
          for (int p = j + 1; p < maxN; ++p) markk[i][p] = 1;
          for (int p = 1; p + i < maxN && p + j < maxN; ++p)
            markk[i + p][j + p] = 1;
        }
      }
    }
    cin >> x1 >> y1;
    if (markk[x1][y1] == 1)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  }
  if (n == 3) {
    for (int i = 0; i < maxN; ++i) {
      for (int j = 0; j < maxN; ++j) {
        for (int k = 0; k < maxN; ++k) {
          if (mark[i][j][k] == 0) {
            for (int p = i + 1; p < maxN; ++p) mark[p][j][k] = 1;
            for (int p = j + 1; p < maxN; ++p) mark[i][p][k] = 1;
            for (int p = k + 1; p < maxN; ++p) mark[i][j][p] = 1;
            for (int p = 1; p + i < maxN && p + j < maxN && p + k < maxN; ++p)
              mark[i + p][j + p][k + p] = 1;
          }
        }
      }
    }
    cin >> x1 >> y1 >> z1;
    if (mark[x1][y1][z1] == 1)
      cout << "BitLGM";
    else
      cout << "BitAryo";
  }
  return 0;
}
