def solve(): arr = [["A", int(input())], ["B", int(input())], ["C", int(input())]] sortedArr = sorted(arr, key=lambda x: x[1], reverse=True) for row in sortedArr: print(row[0]) solve()