b = [[int(input()), "A"], [int(input()), "B"], [int(input()), "C"]] b.sort() for _, a in reversed(b): print(a)