#include <iostream>
#include <sstream>
using namespace std;
int main()
{
    string x, y;
    cin >> x;
    cin >> y;
    int xl = x.length();
    int yl = y.length();
    int l = (xl < yl) ? yl : xl;
    char* xc = new char[l];
    char* yc = new char[l];
    for (int i = 0; i < l; i++) {
        xc[i] = ' ';
        yc[i] = ' ';
    }
    int raz=abs(xl-yl);
    bool vecix = (xl < yl) ? false : true;
    int p = 0;
    for (int i = l-1; i >= 0 && p<=xl; i--) {
        if (raz > 0&& !vecix) {
            raz--;
            continue;
        }
        xc[i] = x[p];
        p++;
    }
    p = 0;
    for (int i = l-1; i >= 0 && p <= yl; i--) {
        if (raz > 0 && vecix) {
            raz--;
            continue;
        }
        yc[i] = y[p];
        p++;
    }
    stringstream test;
    for (int i = l-1; i >=0; i--) {
        if (xc[i] == yc[i] && xc[i] == ' ') continue;
        if (xc[i] == yc[i]) {
            test << xc[i] << yc[i];
            continue;
        }
        test << max(xc[i], yc[i]);

    }
    string rez;
    test >> rez;
    cout << rez;
    delete[]xc;
    delete[]yc;
}