#include <bits/stdc++.h>

using namespace std;

int main()
{
    string x,y;
    string ujy="a",ujx="a";
    cin>>x>>y;
    string eredmeny;
    string nulla="a";
    if(x.length()>y.length())
    {
        for(int i=0;i!=x.length()-y.length()-1;i++)
            ujy+=nulla;
        ujy+=y;
        y=ujy;
    }
    else if(y.length()>x.length())
    {
        for(int i=0;i!=y.length()-x.length()-1;i++)
            ujx+=nulla;
        ujx+=x;
        x=ujx;
    }
    for(int i=0;i<x.length();i++)
        {
            if(x[i]=='a'&&y[i]!='a')
                eredmeny+=y[i];
            else if(y[i]=='a'&&x[i]!='a')
                eredmeny+=x[i];
            else
            {
                if((int)x[i]>(int)y[i])
                    eredmeny+=x[i];
                else if((int)x[i]<(int)y[i])
                    eredmeny+=y[i];
                else
                {
                    eredmeny+=x[i];
                    eredmeny+=x[i];
                }

            }
        }
    cout<<eredmeny;
    return 0;
}