#include <bits/stdc++.h>
using namespace std;
string x,y,rez;
int main(){
    cin>>x>>y;
    for(int i=x.size()-1,j=y.size()-1;i>=0 or j>=0;i--,j--){
        if(i>=0 and j>=0){
            if(x[i]>y[j])rez.push_back(x[i]);
            else if(x[i]<y[j])rez.push_back(y[j]);
            else{
                rez.push_back(x[i]);
                rez.push_back(y[j]);
            }
        }
        else if(i>=0){
            rez.push_back(x[i]);
        }
        else if(j>=0){
            rez.push_back(y[j]);
        }
    }
    reverse(rez.begin(),rez.end());
    cout<<rez<<endl;


return 0;}