#include <iostream>
#include <string>
using namespace std;
int main() {
string str1;
cin>>str1;
//cout<<str1<<endl;
string str2;
cin>>str2;
//cout<<str2<<endl;
string str3;
for(int i=0;i<str1.length();i++){
if(str1[i]>='0'&&str1[i]<='9'){
if(str1[i]=='9')cout<<"0";
else cout<<(char)(str1[i]+1);
}
if(str1[i]>='a'&&str1[i]<='z'){
if(str1[i]=='z')cout<<"A";
else cout<<(char)(str1[i]-31);
}
if(str1[i]>='A'&&str1[i]<='Z'){
if(str1[i]=='Z')cout<<"a";
else cout<<(char)(str1[i]+33);
}
}
cout<<endl;
for(int i=0;i<str2.length();i++){
if(str2[i]>='0'&&str2[i]<='9'){
if(str2[i]=='0')cout<<"9";
else cout<<(char)(str2[i]-1);
}
if(str2[i]>='a'&&str2[i]<='z'){
if(str2[i]=='a')cout<<"Z";
else cout<<(char)(str2[i]-33);
}
if(str2[i]>='A'&&str2[i]<='Z'){
if(str2[i]=='A')cout<<"z";
else cout<<char(str2[i]+31);
}
}
}
// 64 位输出请用 printf("%lld")