object Main extends App {
    val stn = ('a' to 'z').toList ::: ('A' to 'Z').toList
    val in = io.Source.stdin.getLines
    for (n <- in if n != "0") {
        val k = in.next.split(" ").map(_.toInt)
        val kk = Stream.continually(k).flatten
        println(in.next.zip(kk).map{case (c, i) =>
            stn((stn.indexWhere(_ == c)-i+52)%52)
        }.mkString)
    }
}