#!/usr/bin/env python3 h = sorted((int(input()), 'ABC'[i]) for i in range(3))[::-1] for a, b in h: print(b)