# Read the three heights ha = int(input()) hb = int(input()) hc = int(input()) # Create a list of tuples containing height and corresponding letter people = [ (ha, 'A'), (hb, 'B'), (hc, 'C') ] # Sort the list in descending order based on height sorted_people = sorted(people, key=lambda x: x[0], reverse=True) # Output the letters in the sorted order for person in sorted_people: print(person[1])