d=[] Ha=int(input()) Hb=int(input()) Hc=int(input()) d = [(Ha,'A'),(Hb,'B'),(Hc,'C')] d.sort() d.reverse() for i in d : print(i[1])