/*****************************方法一*******************************/
#include <iostream>
#include <vector>
#include <string>
using namespace std;

string helpStr1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
string helpStr2 = "BCDEFGHIJKLMNOPQRSTUVWXYZAbcdefghijklmnopqrstuvwxyza1234567890";
string setPwd(string str)
{
    int len = str.size();
    for(int i=0; i<len; i++)
    {
        for(int j=0; j<helpStr1.size(); j++)
        {
            if(str[i] == helpStr1[j])
            {
                str[i] = helpStr2[j];
                break;
            } 
        }
    }
    return str;
}

string getPwd(string str)
{
    int len = str.size();
    for(int i=0; i<len; i++)
    {
        for(int j=0; j<helpStr2.size(); j++)
        {
            if(str[i] == helpStr2[j])
            {
                str[i] = helpStr1[j];
                break;
            } 
        }
    }
    return str;
}
int main()
{
    string str1, str2;
    string pwdGet, pwdSet;
    while(cin >> str1 >> str2)
    {
        pwdSet = setPwd(str1);
        pwdGet = getPwd(str2);
        cout << pwdSet << endl;
        cout << pwdGet << endl;
    }
    return 0;
}
/*****************************方法二*******************************/
#include <iostream>
#include <vector>
#include <string>
using namespace std;

string setPwd(string str)
{
    int len = str.size();
    for(int i=0; i<len; i++)
    {
        if( (str[i] >= 'a' && str[i] <= 'y') || (str[i] >= 'A' && str[i] <= 'Y') || (str[i] >= '0' && str[i] <= '8') )
        {
            if((str[i] >= 'a' && str[i] <= 'y'))
            {
                str[i] = str[i] + 1; // 变为后一个字母
                str[i] = toupper(str[i]); // 并变为大写
            }
            else if((str[i] >= 'A' && str[i] <= 'Y'))
            {
                str[i] = str[i] + 1; // 变为后一个字母
                str[i] = tolower(str[i]);
            }
            else if((str[i] >= '0' && str[i] <= '8'))
            {
                str[i] = str[i] + 1;
            }
        }
        else if(str[i] == 'z')
        {
            str[i] = 'A';
        }
        else if(str[i] == 'Z')
        {
            str[i] = 'a';
        }
        else if(str[i] == '9')
        {
            str[i] = '0';
        }
    }
    return str;
}

string getPwd(string str)
{
    int len = str.size();
    for(int i=0; i<len; i++)
    {
        if( (str[i] >= 'b' && str[i] <= 'z') || (str[i] >= 'B' && str[i] <= 'Z') || (str[i] >= '1' && str[i] <= '9') )
        {
            if((str[i] >= 'b' && str[i] <= 'z'))
            {
                str[i] = str[i] - 1; // 后一个字母
                str[i] = toupper(str[i]); // 小写变大写
            }
            else if((str[i] >= 'B' && str[i] <= 'Z'))
            {
                str[i] = str[i] - 1; // 后一个字母
                str[i] = tolower(str[i]);
            }
            else if((str[i] >= '1' && str[i] <= '9'))
            {
                str[i] = str[i] - 1;
            }
        }
        else if(str[i] == 'a')
        {
            str[i] = 'Z';
        }
        else if(str[i] == 'A')
        {
            str[i] = 'z';
        }
        else if(str[i] == '0')
        {
            str[i] = '9';
        }
    }
    return str;
}
int main()
{
    string str1, str2;
    string pwdGet, pwdSet;
    while(cin >> str1 >> str2)
    {
        pwdSet = setPwd(str1);
        pwdGet = getPwd(str2);
        cout << pwdSet << endl;
        cout << pwdGet << endl;
    }
    return 0;
}