H = [int(input()) for _ in range(3)] L = [(H[0], 'A'), (H[1], 'B'), (H[2], 'C')] L.sort(reverse=True) for i in range(3): print(L[i][1])