A=int(input()) B=int(input()) C=int(input()) H=[(A,"A"),(B,"B"),(C,"C")] H.sort() H.reverse() for _,i in H: print(i)