a = [int(input()) for _ in range(3)] d = [("A", a[0]), ("B", a[1]), ("C", a[2])] d.sort(key=lambda x:x[1], reverse=True) for k, v in d: print(k)