a = int(input()) b = int(input()) c = int(input()) lst = [[a, "A"], [b, "B"], [c, "C"]] lst.sort(reverse = True) for l in lst: print(l[1])