import java.util.Scanner var input = Scanner(System. `in`) fun inputHeightAndWeight(heightMap: MutableMap){ heightMap["A"] = intArrayOf(input.nextInt(), input.nextInt()) heightMap["B"] = intArrayOf(input.nextInt(), input.nextInt()) heightMap["C"] = intArrayOf(input.nextInt(), input.nextInt()) sort(heightMap) } fun sort(heightMap: MutableMap){ var weightSort: Map = heightMap.toList().sortedBy{ (_, value) -> value[1] }.toMap() var heightSort: Map = weightSort.toList().sortedBy{ (_, value) -> -value[0] }.toMap() heightSort.forEach{ println(it.key) } } fun main(args: Array){ var heightMap: MutableMap = mutableMapOf() inputHeightAndWeight(heightMap) }