#include<bits/stdc++.h>
#define ll long long
#define MAXN 200007
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    string s1,s2;
    cin>>s1>>s2;
    if(s1.length()<s2.length())swap(s1,s2);
    string s="";
    int n1=s1.length();
    int n2=s2.length();
    int i;
    for(i=1;i<=n2;i++)
    {
        if(s2[n2-i]<s1[n1-i]) s.insert(s.begin(),s1[n1-i]);
        else if(s2[n2-i]>s1[n1-i]) s.insert(s.begin(),s2[n2-i]);
        else
        {
            s.insert(s.begin(),s1[n1-i]);
            s.insert(s.begin(),s1[n1-i]);
        } 
    }
    for(i=n1-i;i>=0;i--) s.insert(s.begin(),s1[i]);
    cout<<s<<endl;
}