h=[-int(input())for _ in range(3)] for t,c in sorted(zip(h,['A','B','C'])): print(c)