#include <iostream>
using namespace std;
string l1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
string l2 = "BCDEFGHIJKLMNOPQRSTUVWXYZAbcdefghijklmnopqrstuvwxyza1234567890";
void encoder(string s)
{
    for(int i=0,j; i<s.size(); i++)
    {
        for(j=0; l1[j]!=s[i]; j++);
        s[i] = l2[j];
    }
    cout<<s<<endl;
}
void decoder(string s)
{
    for(int i=0,j; i<s.size(); i++)
    {
        for(j=0; l2[j]!=s[i]; j++);
        s[i] = l1[j];
    }
    cout<<s<<endl;
}
int main()
{
    string str1, str2;
    while(cin>>str1>>str2)
    {
        encoder(str1);
        decoder(str2);
    }
}