import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] h = new int[3]; int[] w = new int[3]; for(int i = 0; i < 3; i++) { h[i] = sc.nextInt(); w[i] = sc.nextInt(); } int[] ord = new int[3]; if(h[0] > h[1]) { ord[0]++; } else if(h[0] < h[1]) { ord[1]++; } else { if(w[0] < w[1]) { ord[0]++; } else { ord[1]++; } } if(h[0] > h[2]) { ord[0]++; } else if(h[0] < h[2]) { ord[2]++; } else { if(w[0] < w[2]) { ord[0]++; } else { ord[2]++; } } if(h[2] > h[1]) { ord[2]++; } else if(h[2] < h[1]) { ord[1]++; } else { if(w[2] < w[1]) { ord[2]++; } else { ord[1]++; } } for(int i = 2; i >= 0; i--) { if(ord[0] == i) System.out.println("A"); if(ord[1] == i) System.out.println("B"); if(ord[2] == i) System.out.println("C"); } } }