are=[["A",int(input())],["B",int(input())],["C",int(input())]] are.sort(key=lambda e:e[1],reverse=True) for i in range(len(are)): print(are[i][0])