val dic = ('A'..'Z').toList() val n = dic.size fun main(args: Array) { val S = readLine() ?: return var ans = "" S.forEachIndexed { i, v -> ans += dic[((v - 'A' - i - 1) % n + n) % n] } println(ans) }