#include<bits/stdc++.h>

using namespace std;

string sudar(string s1, string s2){
    string s3 = "";
    for(int i = 1;i<=min(s1.size(), s2.size());i++){
        if(s1[s1.size()-i]>s2[s2.size()-i]){
            s3.insert(0, 1, s1[s1.size()-i]);
        } else if(s1[s1.size()-i]<s2[s2.size()-i]){
            s3.insert(0, 1, s2[s2.size()-i]);
        } else{
            s3.insert(0, 1, s1[s1.size()-i]);
            s3.insert(0, 1, s2[s2.size()-i]);
        }
    }
    if(s1.size()>s2.size()){
        s3.insert(0, s1.substr(0, s1.size()-s2.size()));
    } else{
        s3.insert(0, s2.substr(0, s2.size()-s1.size()));
    }
    return s3;
}

int main(){
    string x, y;
    cin>>x>>y;
    cout<<sudar(x, y);



    return 0;
}