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