#include <iostream>
#include <string>
using namespace std;
string en_or_decryption (string str, int oper) {
for (auto c = 0; c < str.length(); c++) {
if (str[c] >= '0' && str[c] <= '9') {
if (oper) {
str[c] = (str[c] + 1) > '9' ? '0' : (str[c] + 1);
}
else {
str[c] = (str[c] - 1) < '0' ? '9' : (str[c] - 1);
}
}
else if (str[c] >= 'A' && str[c] <= 'Z') {
if (oper) {
str[c] = tolower(str[c]);
str[c] = (str[c] + 1) > 'z' ? 'a' : (str[c] + 1);
}
else {
str[c] = tolower(str[c]);
str[c] = (str[c] - 1) < 'a' ? 'z' : (str[c] - 1);
}
}
else {
if (oper) {
str[c] = toupper(str[c]);
str[c] = (str[c] + 1) > 'Z' ? 'A' : (str[c] + 1);
}
else {
str[c] = toupper(str[c]);
str[c] = (str[c] - 1) < 'A' ? 'Z' : (str[c] - 1);
}
}
}
return str;
}
int main() {
// int a, b;
// while (cin >> a >> b) { // 注意 while 处理多个 case
// cout << a + b << endl;
// }
string encpt;
cin >> encpt;
string decpt;
cin >> decpt;
encpt = en_or_decryption(encpt, 1);
cout << encpt << endl;
decpt = en_or_decryption(decpt, 0);
cout << decpt << endl;
return 0;
}