l=[] l.append([int(input()),"A"]) l.append([int(input()),"B"]) l.append([int(input()),"C"]) l=sorted(l, reverse=True) for a, b in l: print(b)