p = {'A': int(input()), 'B': int(input()), 'C': int(input())} for k, v in sorted(p.items(), key=lambda x: -x[1]): print(k)