#include <string>
#include <iostream>
using namespace std;
int main() {
string s1;
string s2;
cin >> s1;
cin >> s2;
string s3="";
string s4="";
for(char c:s1){
if(c == 'z'){
s3 += 'A';
}else if(c == 'Z'){
s3 += 'a';
}else if(isalpha(c)){
if(isupper(c)){
s3 += tolower(c)+1;
}else{
s3 += toupper(c)+1;
}
}else if(c == '9'){
s3 += '0';
}else if(isalnum(c)){
s3 += c+1;
}
}
for(char c:s2){
if(c == 'a'){
s4 += 'Z';
}else if(c == 'A'){
s4 += 'z';
}else if(isalpha(c)){
if(isupper(c)){
s4 += tolower(c)-1;
}else{
s4 += toupper(c)-1;
}
}else if(c == '0'){
s4 += '9';
}else if(isalnum(c)){
s4 += c-1;
}
}
cout << s3 << endl;
cout << s4 << endl;
}