class Problem0570: def solve(this): a = (int(input()), "A") b = (int(input()), "B") c = (int(input()), "C") res = [a,b,c] res = sorted(res, reverse=True) for t in res: print(t[1]) if __name__ == "__main__": problem = Problem0570() problem.solve()