lis=[] l=['A','B','C'] for i in range(3): a=int(input()) lis.append([a,l[i]]) lis.sort() for j in range(3): print(lis[2-j][1])