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

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    string x,y,res="";
    cin >> x >> y;
    ll posx=x.size()-1,posy=y.size()-1;
    while (posx>=0 && posy>=0)
    {
        if (x[posx]>y[posy])
            res=x[posx]+res;
        else if (x[posx]<y[posy])
            res=y[posy]+res;
        else
        {
            res=x[posx]+res;
            res=y[posy]+res;
        }
        posx--;
        posy--;
    }
    while (posx>=0)
    {
        res=x[posx]+res;
        posx--;
    }
    while (posy>=0)
    {
        res=y[posy]+res;
        posy--;
    }
    cout << res << "\n";
    return 0;
}