H = {int(input()):"A", int(input()):"B", int(input()):"C"} for k in sorted(list(H.keys()), reverse=True): print(H[k])