l = [] for i in range(3): a = int(input()) l.append([a,i]) l = sorted(l)[::-1] for p in l: a,b = p print(chr(ord('A')+b))