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

int main()
{
    string x, y; cin >> x >> y;
    if (x.length() < y.length()) swap(x, y);
    int length_diff = x.length() - y.length();
    string s = x.substr(0, length_diff);
    for(int i = length_diff, j = 0; i < x.length(); i++, j++)
    {
        int xd = x[i] - '0';
        int yd = y[j] - '0';
        if (xd == yd) { s += x[i]; s += y[j]; }
        else if (xd < yd) s += y[j];
        else s += x[i];
    }
    cout << s << endl;
}