# include <stdio.h>
# include <string>
# include <iostream>
# include <cstdio>
# include <cstdlib>
# include <string>
# include <cstring>


using namespace std;

int main() {

    string linha;
    
    while (true)
    {
        getline(cin, linha);
        if(linha == "0")
        {
            break;
        }
        int tam = linha.length();
        int cn = 0;
        char c[tam+1];

        

        for(int x=0;x<linha.length();x++){
           std::strcpy(c,linha.c_str()); 
           cn = (int)c[x];
           cn -=3;
           if (cn<65){
            cn += 26;
           }
           cout << ((char)cn);
        }
        cout << "\n";
    }
    return 0;
}