#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    string a, b;
    string r;
    string a_ostatak, b_ostatak;
    
    cin>>a;
    cin>>b;
    
    int a_length = a.size();
    int b_length = b.size();
    int min_length = min(a_length, b_length);
    int max_length = max(a_length, b_length);
    
    
    
    for (int i = 0; i < max_length - min_length; i++)
    {
        // Ako je a duzi od b, onda ispisi cifre koje postoje u a,
        // ali ne postoje u b.
        if (a_length > b_length) 
            cout << a[i]; // << endl;
        
        // Ako je a kraci od b, onda ispisi cifre koje postoje u b,
        // ali ne postoje u a.
        else 
            cout << b[i]; // << endl;
    }

    
    if (a_length > b_length)
    {
        // cuvamo ostatak niske a pocevsi od pozicije max_length - min_length
        a_ostatak = a.substr(max_length - min_length);
        b_ostatak = b;
    }
    else if (a_length < b_length)
    {
        // cuvamo ostatak niske b pocevsi od pozicije max_length - min_length
        a_ostatak = a;
        b_ostatak = b.substr(max_length - min_length);
    }
    else
    {
        a_ostatak = a;
        b_ostatak = b;
    }
    
    

    // Ispis preostalih cifara. 
    for (int i = 0; i < min_length; i++)
    {
        char k = a_ostatak[i]; int asciia = (int) k;
        char m = b_ostatak[i]; int asciib = (int) m;
        if (asciia > asciib)
        {
            r = a_ostatak[i];
        }
        else if (asciia < asciib)
        {
            r = b_ostatak[i];
        }
        else if (asciia == asciib)
        {
             r = k;
             cout<<r;
        }
        cout<<r;
    }
}