#include <bits/stdc++.h>
using namespace std;
string a,b,c;
int main(){
    cin>>a>>b;
    if(a.size()>b.size()){
        int x=a.size()-b.size();
        c+=a.substr(0,x);
        for(int i=x;i<a.size();i++){
        if(a[i]>b[i-x])c+= a[i];
        else if(a[i]<b[i-x])c+=b[i-x];
        else{ c+=a[i];
            c+=a[i];}
            }
        }
    else if(a.size()<b.size()){
        int x=b.size()-a.size();
        c+=b.substr(0,x);
        for(int i=x;i<b.size();i++){
        if(b[i]>a[i-x])c+= b[i];
        else if(b[i]<a[i-x])c+=a[i-x];
        else{ c+=b[i];
            c+=b[i];}
            }
        }
    else{
        for(int i=0;i<b.size();i++){
        if(b[i]>a[i])c+= b[i];
        else if(b[i]<a[i])c+=a[i];
        else{ c+=b[i];
            c+=b[i];}
        }
    }
    cout<<c;
    return 0;}