fun main(args: Array) { val inText = readLine()!! val arr = inText.map { it }.toMutableList() for(i in arr.indices) { var newChar = arr[i] - (i+1) while (newChar < 'A') { newChar = 'Z' - ('A' - newChar - 1) } arr[i] = newChar } println(arr.joinToString("")) }