import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; int one = 0; int two = 0; for(int i = 0; i < n; i++) { int c = sc.nextInt(); if(c > 2) count++; if(c == 1) one++; if(c == 2) two++; } String ans = "B"; if((count == 0) && (two == 0) && (one % 2 == 1)) ans = "A"; System.out.println(ans); } }