#include <bits/stdc++.h>
using namespace std;

int main()
{
    string x, y, z = "";
    cin >> x >> y;

    int i = x.size() - 1, j = y.size() - 1;

    for (; i > -1 || j > -1; i--, j--)
    {
        if (i <= -1)
            z += y[j];

        else if (j <= -1)
            z += x[i];

        else
        {
            if (x[i] == y[j])
            {    
                z += x[i]; z += y[j]; 
            }
            else if (x[i] > y[j])
                z += x[i];
            else if (x[i] < y[j])
                z += y[j];
        }
    }

    for (i = z.size() - 1; i >= 0; i--)
        cout << z[i];

    return 0;
}