#include <cctype> #include <iostream> using namespace std; string encode(string& str) { string ans; for (char c : str) { if (isdigit(c)) { int n = (c - '0' + 1) % 10; ans += ('0' + n); } else if (isalpha(c)) { c ^= 32; int a; if (c >= 'a') { a = 'a'; } else { a = 'A'; } int n = (c - a + 1) % 26; ans += (a + n); } } return ans; } string decode(string& str) { string ans; for (char c : str) { if (isdigit(c)) { int n = (c - '0' + 9) % 10; ans += ('0' + n); } else if (isalpha(c)) { c ^= 32; int a; if (c >= 'a') { a = 'a'; } else { a = 'A'; } int n = (c - a + 25) % 26; ans += (a + n); } } return ans; } int main() { string enstr, destr; while (cin >> enstr >> destr) { // 注意 while 处理多个 case auto s1 = encode(enstr); auto s2 = decode(destr); cout << s1 << endl; cout << s2 << endl; } } // 64 位输出请用 printf("%lld")