s = ord("A") d = [0 for i in range(3)] for i in range(3): d[i] = [s, int(input())] s += 1 d.sort(key = lambda x: x[1]) for j in range(3): print(chr(d[j][0]))