#yuki_570 a=[]*3 for i in xrange(3): p=int(raw_input()) a.append([chr(65+i),p]) b=sorted(a, key=lambda x:x[1], reverse=True) for i in xrange(3): print b[i][0]