from operator import itemgetter for it in sorted(zip("ABC", (int(input()) for _ in range(3))), key=itemgetter(1), reverse=True): print(it[0])