hs = [[i, int(input())] for i in range(3)] hs = sorted(hs, key = lambda x: x[1]) people = ["A", "B", "C"] for h in hs[::-1]: print(people[h[0]])