#include <bits/stdc++.h>
using namespace std;
bool babaza(string a) {
for (int i = 0; i < a.length()-1; i++) {
if (a[i] == a[i+1]) return false;
}
return true;
}
int main() {
string a,b;
cin >> a >> b;
string absdiff = a;
string ldiff = a, rdiff = a;
for (int i = 0; i < a.length(); i++) {
absdiff[i] = abs(b[i] - a[i]);
if (i%2) {
ldiff[i] = b[i];
} else {
rdiff[i] = b[i];
}
}
if (babaza(absdiff)) {
cout << a << '\n';
cout << b << '\n';
return 0;
}
if (babaza(ldiff)) {
cout << a << '\n';
cout << ldiff << '\n';
cout << b << '\n';
return 0;
}
if (babaza(rdiff)) {
cout << a << '\n';
cout << rdiff << '\n';
cout << b << '\n';
return 0;
}
set<char> used = {};
for (int i = 0; i < a.length(); i++) {
used.insert(a[i]);
used.insert(b[i]);
}
char unused = 'A';
for (;;unused++) {
if (!(used.contains(unused))) {
break;
}
}
cout << a << '\n';
for (int i = 0; i < a.length(); i++) {
if (i%2) {
ldiff[i] = unused;
}
}
cout << ldiff << '\n';
for (int i = 0; i < a.length(); i++) {
if (!(i%2)) {
ldiff[i] = b[i];
}
}
cout << ldiff << '\n';
cout << b << '\n';
return 0;
}