package net.ipipip0129.yukicoder.no570; import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); List humanList = new ArrayList<>(); final String[] names = new String[] {"A", "B", "C"}; for (int i = 0; i < 3; i++) humanList.add(new Human(names[i], Integer.parseInt(scan.nextLine()))); Collections.sort(humanList, new HumanComparator()); humanList.stream().forEach(i -> System.out.println(i.getName())); } } class Human { private String name; private int height; public Human(String name, int height) { this.name = name; this.height = height; } public String getName() { return name; } public int getHeight() { return height; } } class HumanComparator implements Comparator { @Override public int compare(Human o1, Human o2) { if (o1.getHeight() < o2.getHeight()) { return 1; } else { return -1; } } }