lst = [] lst.append(('A', int(input()))) lst.append(('B', int(input()))) lst.append(('C', int(input()))) lst.sort(key=lambda x: x[1], reverse=True) for l in lst: print(l[0])