def main(): H = tuple(int(input()) for _ in [0] * 3) brother = {'A':H[0], 'B':H[1], 'C':H[2]} ans = sorted(brother.items(), key=lambda x: x[1], reverse=True) for s in ans: print(s[0]) main()