H = sorted([[int(input()), i] for i in range(3)], reverse=True) print('\n'.join([['A', 'B', 'C'][i[1]] for i in H]))