#include <bits/stdc++.h>
using namespace std;

int main(int argc, char **argv){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    string a, b;
    cin >> a >> b;

    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());

    if(a.size() > b.size()) {
        string t = a;
        a = b;
        b = t;
    }
    string ans;

    for(int i = 0; i < a.size(); i++){
        if(a[i] >= b[i]) {
            ans+= a[i];
        }
        if(b[i] >= a[i]){
            ans += b[i];
        }
    }
    for(int i = a.size(); i < b.size(); i++){
        ans += b[i];
    }

    reverse(ans.begin(), ans.end());

    cout << ans << endl;

    return 0;
}