A, B, C = map(int, open(0)) L = sorted([(A, "A"), (B, "B"), (C, "C")], reverse=True) for l in L: print(l[1])