object Main {
  val alphabets = ('A' to 'Z').toList
  def main(args: Array[String]): Unit = {
    val result = solve(io.Source.stdin.getLines().toList)
    println(result)
  }
  def solve(ss: List[String]): String = {
    val rotN = ss.head.toInt
    val chars = ss(1).toList
    chars.map(rot(_, rotN)).mkString
  }
  def rot(c: Char, n: Int): Char = {
    val newIndex = alphabets.indexOf(c) + n
    alphabets(newIndex % alphabets.length)
  }
}

