package yukicoder174; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); Pair[] p = {new Pair(a, 'A'), new Pair(b, 'B'), new Pair(c, 'C')}; Arrays.sort(p, new Comparator() { public int compare(Pair p1, Pair p2) { return Integer.compare(p2.a, p1.a); } }); for(int i = 0 ; i < 3 ; i++) { System.out.println(p[i].c); } } public static class Pair { int a; char c; public Pair(int a, char c) { this.a = a; this.c = c; } } }