for i in sorted([(int(input()),chr(i+65)) for i in range(3)], reverse=True): print(i[1])