#include <bits/stdc++.h>
using namespace std;
using namespace std;
typedef long long ll;
typedef vector <int> vi;
typedef pair <int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<ll> vll;
#define A first
#define B second
#define PB push_back
#define MP make_pair
#define all(v) v.begin(),v.end()
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);

int main()
{
    FAST
    string s,g;
    cin>>s>>g;
    string r="";
    int i=0,j=0;
    if(s.size()>g.size())
    {
        r+=s.substr(0,s.size()-g.size());
        i=s.size()-g.size();
    }
    else if(s.size()<g.size())
    {
        r+=g.substr(0,g.size()-s.size());
        j=g.size()-s.size();
    }
    while(i<s.size() && j<g.size())
    {
        if(s[i]>g[j]) r+=s[i];
        else if(s[i]<g[j]) r+=g[j];
        else
        {
            r+=s[i];
            r+=g[j];
        }
        i++;
        j++;
    }


    cout<<r;
    return 0;
}