#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(int argc, char *argv[])
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string a,b,resenje="";
    cin >> a >> b;
    reverse(a.begin(),a.end());
    reverse(b.begin(),b.end());
    while(a.size()>b.size())
    {
        resenje+=a.back();
        a.pop_back();
    }
    while(b.size()>a.size())
    {
        resenje+=b.back();
        b.pop_back();
    }
    reverse(a.begin(),a.end());
    reverse(b.begin(),b.end());
    for(ll i=0;i<min(a.size(),b.size());i++)
    {
        if(a[i]==b[i])
        {
            resenje+=a[i];
            resenje+=b[i];
        }
        else
        {
            if(a[i]>b[i]) resenje+=a[i];
            else resenje+=b[i];
        }
    }
    cout << resenje;
}