D = [] D.append((int(input()), "A")) D.append((int(input()), "B")) D.append((int(input()), "C")) D.sort(reverse=True) for _, a in D: print(a)