#include <bits/stdc++.h>
#define ll long long


using namespace std;

void solve() {
    string x, y;
    cin >> x >> y;
    ll xCnt = x.size()-1;
    ll yCnt = y.size()-1;
    string ans = "";
    while (xCnt > -1 || yCnt > -1)
    {
        char currX;
        char currY;
        if (xCnt > -1) {
            currX = x[xCnt];
            xCnt--;
        }
        else {
            currX = '.';
        }
        if (yCnt > -1) {
            currY = y[yCnt];
            yCnt--;
        }
        else {
            currY = '.';
        }
        //-----------------
        if (currX == currY) {
            ans += currY;
            ans += currX;
        }
        else {
            ans += max(currX, currY);
        }
    }
    std::reverse(ans.begin(), ans.end());
    cout << ans;

}


int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    solve();
    return 0;
}