#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){

    string a,b,rez="";
    cin>>a>>b;
    if (a.length()<b.length()) swap(a,b);
   // cout<<a<<" "<<b<<endl;
    int k=a.length()-b.length();
   // cout<<a.length()<<" "<<b.length()<<endl;
    for (int i=k;i<a.length();i++){
    //	cout<<"a: "<<a[i]<<" b: "<<b[i-k]<<endl;
        if (a[i]>b[i-k]) rez+=a[i];
        else if (a[i]<b[i-k]) rez+=b[i-k];
        else {
        	rez+=a[i];
			rez+=b[i-k];	
		}
    //    cout<<rez<<endl;
    }
    cout<<a.substr(0,a.length()-b.length())+rez;

    return 0;
}