public void solve() throws IOException {
    int[] counts = new int[10];
    for (int x = 0; x < 6; x++) {
      counts[nextInt()]++;
    }

    boolean hasfour = false;
    for (int x = 1; x < 10; x++) {
      if (counts[x] >= 4) {
        hasfour = true;
        counts[x] -= 4;
        break;
      }
    }

    if (!hasfour) {
      System.out.println("Alien");
      return;
    }

    for (int x = 1; x < 10; x++) {
      if (counts[x] == 1) {
        System.out.println("Bear");
        return;
      }
      if (counts[x] == 2) {
        System.out.println("Elephant");
        return;
      }
    }

  }