f=lambda:int(input()) h=[f() for i in range(3)] d={h[0]:'A',h[1]:'B',h[2]:'C'} srt=sorted(d)[::-1] for i in srt: print(d[i])