array = ["A","B","C"] h = [int(input()) for i in range(3)] h_c = list(sorted(h)[::-1]) [print(array[h.index(hi)]) for hi in h_c]