name = ['A', 'B', 'C'] tab = zip([int(input()) for _ in range(3)], name) for t in sorted(tab, reverse=True): print(t[1])