#include <bits/stdc++.h>

using namespace std;

int main(){
    string a,b;
    cin >> a;
    cin >> b;

    if(a.size()<b.size()){
        string c = a;
        a = b;
        b = c;
    }
    int as = a.size();
    int bs = b.size();
    
    for(int i=0;i<a.size();i++){
        if(bs-as+i >= 0){
            if(a[i] <= b[bs-as+i]) cout << b[bs-as+i];
            if(a[i] >= b[bs-as+i]) cout << a[i];
        }
        else{
            cout << a[i];
        }
    }
    cout << endl;
    return 0;
}