#include <iostream>
#include <string>
using namespace std;

string encryption(string st1){//加密函数
    for(int i = 0; i < st1.size(); i++){
        if(st1[i] >= 'a' && st1[i] <= 'y'){
            st1[i] = toupper(st1[i]+1);
        }
        else if(st1[i] == 'z'){
            st1[i] = 'A';
        }
        else if(st1[i] >= 'A' && st1[i] <= 'Y')
        {
            st1[i] = tolower(st1[i]+1);
        }
        else if(st1[i] == 'Z'){
            st1[i] = 'a';
        }
        else if(st1[i] >= '0' && st1[i] <= '8'){
            st1[i] = (st1[i]+1);
        }
        else if(st1[i] == '9'){
            st1[i] = '0';
        }
    }
    return st1;    
}

string decrypt(string st2){//解密函数
     for(int i = 0; i < st2.size(); i++){
        if(st2[i] >= 'b' && st2[i] <= 'z'){
            st2[i] = toupper(st2[i]-1);
        }
        else if(st2[i] == 'a'){
            st2[i] = 'Z';
        }
        else if(st2[i] >= 'B' && st2[i] <= 'Z')
        {
            st2[i] = tolower(st2[i]-1);
        }
        else if(st2[i] == 'A'){
            st2[i] = 'z';
        }
        else if(st2[i] >= '1' && st2[i] <= '9'){
            st2[i] = (st2[i]-1);
        }
        else if(st2[i] == '0'){
            st2[i] = '9';
        }
    }
    return st2;
}

int main(){
    
    string str1;
    string str2;
    cin >> str1;
    cin >> str2;
    cout << encryption(str1) <<endl;//输出加密字符串
    cout << decrypt(str2) << endl;  //输出解密字符串
    
    return 0;
}