A = int(input()) B = int(input()) C = int(input()) L = [(A, 'A'), (B, 'B'), (C, 'C')] L.sort(reverse=True) for v, k in L: print(k)