def solve(): myDict = {"A": int(input()), "B": int(input()), "C": int(input())} sortedDict = sorted(myDict.items(), reverse=True) for rec in sortedDict: print(rec[0]) solve()