H = {} for i in range(3): h = int(input()) H[i] = h H = sorted(H.items(), key=lambda x: x[1]) for i in range(len(H)): if H[i][0] == 0: print("A") elif H[i][0] == 1: print("B") else: print("C")