list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = list.dup * 2
idx = 0
h = list.chars.inject({}) { |acc, c| acc[c] = idx; idx += 1; acc; }

n = gets.to_i
s = gets.chop.chars
a = ''
s.each do |k|
  a += ans[h[k] + n]
end

puts a