private fun next() = readLine()!! private fun nextInt() = next().toInt() private fun nextLong() = next().toLong() private fun nextDouble() = next().toDouble() private fun nextList() = next().split(" ") private fun nextIntList() = next().split(" ").map { it.toInt() }.toIntArray() private fun nextLongList() = next().split(" ").map { it.toLong() }.toLongArray() private fun nextDoubleList() = next().split(" ").map { it.toDouble() }.toDoubleArray() fun main(args: Array) { var turn = 0 while (turn < 1000) { val n = nextInt() if (n == -1) { return } val h = IntArray(n) { 0 } val p = IntArray(n) { 0 } val x = IntArray(n) { 0 } for (i in 0 until n) { val hpx = next() h[i] = hpx[0].toInt() p[i] = hpx[1].toInt() x[i] = hpx[2].toInt() } println("S") turn++ } }