a = [] for i in range(3): a.append(int(input())) b = [(a[0], "A"), (a[1], "B"), (a[2], "C")] b.sort() for i in range(3): print(b[2-i][1])