#include <stdio.h>
#include <string.h>
int main(){
    char s[80];
    int i,c;
    while(scanf("%s",&s)!=EOF){
        if(!strcmp(s,"!")) break;
        for(i=0;i<strlen(s);i++){
            if(s[i]>='a'&&s[i]<='m')
            {
                c=s[i]-'a';
                s[i]='z'-c;
            }
            else if(s[i]>='n'&&s[i]<='z')
            {
                c='z'-s[i];
                s[i]='a'+c;
            }
            else if(s[i]>='A'&&s[i]<='M')
            {
                c=s[i]-'A';
                s[i]='Z'-c;
            }
            else if(s[i]>='N'&&s[i]<='Z')
            {
                c='Z'-s[i];
                s[i]='A'+c;
            }            
        }
        printf("%s\n",s);
    }
}
(•̀ᴗ•́)و