#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    vector<char> x, y;
    string s1, s2;
    cin >> s1;
    cin >> s2;
    if(s1.size() > s2.size())
    {
        for(int i = 0; i < s1.size(); i++)
        {
            x.push_back(s1[i]);
            if(i < s2.size()) y.push_back(s2[i]);
        }
    }
    else
    {
        for(int i = 0; i < s2.size(); i++)
        {
            x.push_back(s2[i]);
            if(i < s1.size()) y.push_back(s1[i]);
        }
    }
    int k = 0;
    while(k < x.size() - y.size())
    {
        cout << x[k];
        k++;
    }
    int j = 0;
    while(k < x.size() && j < y.size())
    {
        x[k] > y[j] ? cout << x[k] : x[k] == y[j] ? cout << x[k] << y[j] : cout << y[j];
        k++;
        j++;
    }
    cout << endl;
    return 0;
}