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