from string import* L=ascii_lowercase U=L.upper() n=input()%26 print raw_input().translate(maketrans("?!"+L+U,"!?"+L[n:]+L[:n]+U[n:]+U[:n]))