import numpy l = [int(input()) for _ in range(3)] for i in [2,1,0]: print(['A','B','C'][numpy.argsort(l)[i]])