gets $/=" " C=$<.map &:to_i puts C.max>2||C.count(1)&1<1?:B: :A