#import int k,c;main(){for(;~(c=getchar());putchar(c>64&c%32<27?(c%32+k)%26+1+(c&96):c))k=k?k:7+c/8%3*6;}