print(*[x[1] for x in sorted([(int(input()), n) for _, n in zip(range(3), ["A", "B", "C"])], key=lambda x: -x[0])], sep="\n")