#!/usr/bin/env ruby
# coding: utf-8

al1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
al2 = {}
al1.split(//).each_with_index do |ch, index|
  al2[ch] = index
end

n = ARGF.gets.to_i
s1 = ARGF.gets.chomp

s2 = s1.split(//).map do |ch|
  al1[(al2[ch] + n) % 26]
end.join("")

puts s2
