import java.io.*; import java.util.*; public class Main_yukicoder582 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); int[] c = new int[n]; int xor = 0; for (int i = 0; i < n; i++) { c[i] = sc.nextInt(); xor ^= c[i]; } xor &= 0x3; if (xor == 0) { pr.println('B'); } else if (xor == 1) { pr.println('A'); } else if (xor == 2) { pr.println('B'); } else { pr.println('A'); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }