#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a, b;
    string r;
    cin>>a;
    cin>>b;

    for (int i = 0; i <= max (a.size(), b.size()); i++)
    {
        char k = a[i]; int asciia = (int) k;
        char m = b[i]; int asciib = (int) m;
        if (asciia > asciib)
        {
            r = a[i];
        }
        else if ( asciia < asciib)
        {
            r = b[i];
        }
        else if (asciia == asciib)
        {
             r = k;
             cout<<k;
        }
    cout<<r;
    }

}