import java.io.*; import java.util.*; public class Main_yukicoder570 { private static Scanner sc; private static Printer pr; private static void solve() { int ha = sc.nextInt(); int hb = sc.nextInt(); int hc = sc.nextInt(); if (ha > hb && hb > hc) { pr.println('A'); pr.println('B'); pr.println('C'); } else if (ha > hc && hc > hb) { pr.println('A'); pr.println('C'); pr.println('B'); } else if (hb > ha && ha > hc) { pr.println('B'); pr.println('A'); pr.println('C'); } else if (hb > hc && hc > ha) { pr.println('B'); pr.println('C'); pr.println('A'); } else if (hc > ha && ha > hb) { pr.println('C'); pr.println('A'); pr.println('B'); } else if (hc > hb && hb > ha) { pr.println('C'); pr.println('B'); pr.println('A'); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }