#include <iostream>
#include <string>
using namespace std;
int main(){
    string X,Y;
    cin>>X>>Y;
    string res="";
    if(X.size()==Y.size())
        for(int i=0;i<X.size();i++){
            res.push_back(max(X[i],Y[i]));
            if(X[i]==Y[i])
                res.push_back(X[i]);
        }
    else if(X.size()>Y.size()){
        for(int i=0;i<X.size()-Y.size();i++)
            res.push_back(X[i]);
        for(int i=X.size()-Y.size();i<X.size();i++){
            res.push_back(max(X[i],Y[i-X.size()+Y.size()]));
            if(X[i]==Y[i-X.size()+Y.size()])
                res.push_back(X[i]);
        }
    }
    else{
        for(int i=0;i<Y.size()-X.size();i++)
            res.push_back(Y[i]);
        for(int i=Y.size()-X.size();i<Y.size();i++){
            res.push_back(max(X[i+X.size()-Y.size()],Y[i]));
            if(X[i+X.size()-Y.size()]==Y[i])
                res.push_back(Y[i]);
        }
    }
    cout<<res;
	return 0;
}