height_dict = {"A":int(input()),"B":int(input()),"C":int(input())} for k,v in sorted(height_dict.items(), key=lambda x:-x[1]): print(k)