n = gets.to_i
s = gets.strip.to_s  

str_array = s.each_codepoint.to_a
x = 0

while x < str_array.size
   str_array[x] = ((str_array[x]-65)+n) % 26
   str_array[x] = str_array[x] + 65
   x += 1
end

s = str_array.map {| x | x.chr }

x = 0
while x < s.size
   printf "#{s[x]}"
   x += 1
end
printf "\n"
