heights = dict() heights['A'] = int(input()) heights['B'] = int(input()) heights['C'] = int(input()) for key, value in sorted(heights.items(), key=lambda x: -x[1]): print(key)