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