#include <iostream>
#include <stdlib.h>
using namespace std;

int main ()
{
	string x,y,z;
	cin>>x>>y;
    int prenesi=0;
    int dif=0,a,b;
    a=x.length();
    b=y.length();
    dif=abs(a-b);
	if(x.length()>=y.length())
    {
        z.resize(y.length()+x.length());
        for(int j=0;j<dif;j++)
        {
            z[j+prenesi]=x[j];
        }
        for(int i=dif;i<x.length();i++)
        {

            if(x[i]>y[i-dif])
            {
                z[i+prenesi]=x[i];
            }
            else if(y[i-dif]>x[i])
            {
                z[i+prenesi]=y[i-dif];
            }
            else
            {
                z[i+prenesi]=x[i];
                prenesi++;
                z[i+prenesi]=y[i-dif];
            }
        }

    }
    else if(x.length()<y.length())
    {
        z.resize(y.length()+x.length());
        for(int j=0;j<dif;j++)
        {
            z[j+prenesi]=y[j];
        }
        for(int i=dif;i<y.length();i++)
        {

            if(y[i]>x[i-dif])
            {
                z[i+prenesi]=y[i];
            }
            else if(x[i-dif]>y[i])
            {
                z[i+prenesi]=x[i-dif];
            }
            else
            {
                z[i+prenesi]=y[i];
                prenesi++;
                z[i+prenesi]=x[i-dif];
            }
        }
    }
    cout<<z<<endl;

	return 0;
}