#include<bits/stdc++.h>
using namespace std;
int main(){
    string a;
    string b;
    cin>>a;
    cin>>b;
    string res="";
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    int m=0;
    if(a.length()>=b.length()){
        m=b.length();
    }
    else{
        m=a.length();
    }
    int maks=a.length()+b.length()-m;
    for (int i=0; i<m; i++){
        if (a[i]-'0'>b[i]-'0'){
            res+=a[i];
        }
        else if (b[i]-'0'>a[i]-'0'){
            res+=b[i];
        }
        else{
            res+=a[i];
            res+=b[i];
        }
    }
    if (a.length()>b.length()){
        for (int i=m; i<maks; i++){
            res=res+a[i];
        }
    }
    else if (a.length()<b.length()){
        for (int i=m; i<maks; i++){
            res=res+b[i];
        }
    }
    reverse(res.begin(), res.end());
    cout<<res;
}