#include<iostream>
#include<vector>
#include<string>

using namespace std;

string encodeStr(string str){
    string res;
    for(auto s: str){
        if(isalpha(s)){
            if(isalpha(s)){
                if(isupper(s)){
                    s = tolower(s);
                    if(s == 'z'){
                        s = 'a';
                    }else{
                        s = char(s+1);
                    }
                }else if(islower(s)){
                    s = toupper(s);
                    if(s == 'Z'){
                        s = 'A';
                    }else{
                        s = char(s+1);
                    }
                }
            }
        }else if(isdigit(s)){
            if(s == '9') s = '0';
            else s = s+1;
        }
        res+=s;
    }
    return res;
}

string decodeStr(string str){
    string res;
    for(auto s: str){
        if(isalpha(s)){
            if(isalpha(s)){
                if(isupper(s)){
                    s = tolower(s);
                    if(s == 'a'){
                        s = 'z';
                    }else{
                        s = char(s-1);
                    }
                }else if(islower(s)){
                    s = toupper(s);
                    if(s == 'A'){
                        s = 'Z';
                    }else{
                        s = char(s-1);
                    }
                }
            }
        }else if(isdigit(s)){
            if(s == '0') s = '9';
            else s = s-1;
        }
        res+=s;
    }
    return res;
}

int main(){
    string str1, str2;
    while(cin >> str1 >> str2){
        cout << encodeStr(str1) << endl;
        cout << decodeStr(str2) << endl;
    }
    return 0;
}