l=[] l.append((int(input()),"A")) l.append((int(input()),"B")) l.append((int(input()),"C")) l.sort() for i,j in l[::-1]: print(j)