import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); boolean flag = false; int cnt1 = 0; int cnt2 = 0; for(int i = 0; i < N; i++) { int C = scan.nextInt(); if(C > 2){ flag = true; } if(C == 1) { cnt1++; } if(C == 2) { cnt2++; } } scan.close(); if(flag) { System.out.println("B"); }else { if(cnt1 == N && cnt1 % 2 == 1) { System.out.println("A"); }else if(cnt2 == 1 && cnt1 % 2 == 1) { System.out.println("A"); }else { System.out.println("B"); } } } }