for x in sorted([[int(input()),'A'],[int(input()),'B'],[int(input()),'C']])[::-1]:print(x[1])