a = [int(input()), 'A'] b = [int(input()), 'B'] c = [int(input()), 'C'] l = sorted([a, b, c])[::-1] for i in range(3): print(l[i][1])