ha,wa=map(int,input().split()) hb,wb=map(int,input().split()) hc,wc=map(int,input().split()) from operator import index, itemgetter l=[[ha,wa],[hb,wb],[hc,wc]] l2=sorted(l,key=lambda x: (x[0],-x[1])) l2=l2[::-1] for x in l2: if l.index(x)==0: print("A") elif l.index(x)==1: print("B") elif l.index(x)==2: print("C")