x,y=input().split(' ',1)
t=''
for i in y:
if i.isspace():
t+=' '
elif i.islower():
t+=chr((ord(i)-ord('a')+int(x))%26+ord('a'))
else:
t+=chr((ord(i)-ord('A')+int(x))%26+ord('A'))
print(t)
#解密:减去int(移动位数),其他都跟加密相同
ord(i)-order(‘a’)+int(x)是转化后字符与’a’的相差位数