r=readline for(i in s=r(t=r()%26))putstr(<>&#{(c=s.charCodeAt(i))>64?c%45>3?c+t-26*(c%32+t>26):c:3-c%30?c:c^30};)