fun main (args:Array<String>){
    val N = readLine()!!.toInt()
    var S = readLine()!!

    fun changeChar(changePoint: Int): (s: Char)-> Char {
        val changePoint = changePoint
        return {
            if (it.toInt() + changePoint > 'Z'.toInt()) {
                ('A'.toInt() + (it.toInt() + changePoint - 'Z'.toInt() - 1)).toChar()
            } else {
                (it.toInt() + changePoint).toChar()
            }
        }
    }

    val changeChar = changeChar(N)

    for (s in S) {
        print(changeChar(s))
    }
}
