H = [[int(input()), 'A'], [int(input()), 'B'], [int(input()), 'C']] H.sort() print(H[2][1]) print(H[1][1]) print(H[0][1])