map = {} map[int(input())] = 'A' map[int(input())] = 'B' map[int(input())] = 'C' for h in sorted(map.keys(), reverse=True): print(map[h])