using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); var c = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); int o = c.Count(x => x == 1); int t = c.Count(x => x == 2); string a = ""; if (o == n && n % 2 == 1) a = "A"; if (o == n - 1 && t == 1 && n % 2 == 0) a = "A"; else a = "B"; Console.WriteLine(a); } } }