#include <bits/stdc++.h>

using namespace std;

int b1,b2;
string s1,s2;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cin >> s1 >> s2;
    b1 = s1.size();
    b2 = s2.size();
    if(b1>b2)
    {
        swap(s1,s2);
        swap(b1,b2);
    }
    for(int i=0; i<b2-b1; i++) cout << s2[i];
    for(int i=0; i<b1; i++)
    {
        if(s1[i]<s2[i+b2-b1]) cout << s2[i+b2-b1];
        if(s1[i]>s2[i+b2-b1]) cout << s1[i];
        if(s1[i]==s2[i+b2-b1]) cout << s1[i] << s1[i];
    }
    cout <<endl;
    return 0;
}