H = [[int(input()), chr(ord("A") + i)] for i in range(3)] H.sort(reverse = True) for i in range(3): print(H[i][1])