heights = {"A": 0,"B":0,"C":0,} for height in heights: heights[height] = int(input()) lists = sorted(heights.items(), key=lambda x: x[1],reverse=True) for n in range(3): print(lists[n][0])