ABC = { "A": 0, "B": 0, "C": 0, } ABC["A"] = int(input()) ABC["B"] = int(input()) ABC["C"] = int(input()) for abc in sorted(ABC): print(abc)