H = [int(input()) for _ in range(3)] D = {'A':H[0], 'B':H[1], 'C':H[2]} for p, h in sorted(D.items(), key=(lambda x: -x[1])): print(p)