H = [["ABC"[i], int(input())] for i in range(3)] H.sort(reverse=True, key=lambda x:x[1]) for h in H: print(h[0]);