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

using namespace std;

string x;
string y;
long long int dokle;
string ostatak;

int main(){

    cin >> x;
    cin >> y;

    if(x.size() < y.size()){
        dokle = y.size() - x.size();
        ostatak = y.substr(0, dokle);
        long long int i = 0;
        long long int pom = dokle;
        cout << ostatak;
        for(i = 0, pom = dokle; i < x.size() && pom < y.size(); i++,pom++){
            if(x[i] < y[pom]){
                cout << y[pom];
                continue;
            }
            else if(x[i] > y[pom]){
                cout << x[i];
                continue;
            }
            else{
                cout << x[i] << y[pom];
                continue;
            }
        }
    }

    else{
        dokle = x.size() - y.size();
        ostatak = x.substr(0, dokle);
        long long int i = 0;
        long long int pom = dokle;
        cout << ostatak;
        for(i = 0, pom = dokle; i < y.size() && pom < x.size(); i++,pom++){
            if(y[i] < x[pom]){
                cout << x[pom];
                continue;
            }
            else if(y[i] > x[pom]){
                cout << y[i];
                continue;
            }
            else{
                cout << y[i] << x[pom];
                continue;
            }
        }
    }
    
    return 0;
}