#include <iostream>
#include <ostream>
#include <math.h>
#include <string.h>
using namespace std;

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

    long long int l1= a.size(), l2=b.size();
    long long int ls=l2,lm=l1;

    if(l1<l2)
        swap(ls,lm);


        long long int mn =lm-ls;

    for(long long int i =0; i<lm; i++)
    {
        if(l1==l2)
        {
            if(a[i]== b[i])
                cout << a[i]<< b[i];
            else if(a[i]> b[i])
                cout << a[i];
            else
                cout << b[i];
        }

        else if(l1<l2)
        {

            if(i<mn)
                cout << b[i];
            else
                {
                if(a[i-mn]== b[i])
                    cout << a[i-mn];
                else if(a[i-mn]> b[i])
                    cout << a[i-mn];
                else
                    cout << b[i];
                }

        }

        else
        {
            if(i<=mn)
                cout << a[i];
            else
            {
                if(a[i]== b[i-mn])
                    cout << a[i]<< b[i-mn];
                else if(a[i]> b[i-mn])
                    cout << a[i];
                else
                    cout << b[i-mn];
            }

        }




    }


    return 0;
}