k,c;main(){for(;read(0,&c,1);putchar(isalpha(c)?(c%32+k)%26+1+(c&96):c))k=k?k:7+c/8%3*6;}