main(c,r){for(gets(r);c=getchar(),~c;putchar(isalpha(c)?(c%32+atoi(r)-1)%26+1|c&96:693%c?c:c^30));}