a = int(input()) b = int(input()) c = int(input()) l = [(a,'A'),(b,'B'),(c,'C')] l.sort(reverse = True) for x,s in l: print(s)