name =["A","B","C"] data ={} key =[] for i in range(3): num = -int(input()) key.append(num) data[num] = name[i] for i in sorted(key): print(data[i])