#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string a,b,c;
    cin >> a >> b;
    int A=a.size(),B=b.size();
    int n=min(A,B),m=(A+B)-n;
    int i=0;
    for(i=0; i<n; i++){
        if(a[A-i-1]>b[B-i-1])c.push_back(a[A-i-1]);
        else if(a[A-i-1]<b[B-i-1])c.push_back(b[B-i-1]);
        else if(a[A-i-1]==b[B-i-1]){c.push_back(a[A-i-1]);c.push_back(b[B-i-1]);}
    }
    while(i<m){
        if(A>B)c.push_back(a[A-i-1]);
        else if(A<B)c.push_back(b[B-i-1]);
        i++;
    }
    reverse(c.begin(),c.end());
    cout << c << endl;
    return 0;
}