local ior = io.input() local n = ior:read("*n") local tot = 0 local b2 = 0 local b3 = false for i = 1, n do local c = ior:read("*n") tot = tot + c if(c == 2) then b2 = b2 + 1 elseif(3 <= c) then b3 = true end end if(tot % 2 == 0 or b3 or 2 <= b2) then print("B") else print("A") end