arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split('')
n = gets.to_i
s = gets.chomp.split('')
map = {}
arr.each_with_index do |a, i|
  map[a] = arr[(i + n) % arr.count]
end
s.each do |a|
  print map[a]
end
puts