#include <bits/stdc++.h>
using namespace std;

int main(){

    string x;
    string y;
    vector<char> res;

    cin>>x;
    cin>>y;
    int n = min(x.size(), y.size());
    reverse(x.begin(), x.end());
    reverse(y.begin(),y.end());

    for(int i = 0; i<=n-1; i++){

        if(x[i] == y[i]){
            res.push_back(x[i]);
            res.push_back(y[i]);
        }
        else{
            res.push_back(max(x[i], y[i]));
        }
    }

    if(x.size()>y.size()){

        for(int i = n; i<=x.size()-1; i++){
            res.push_back(x[i]);
        }
    }
    if(x.size()<y.size()){

        for(int i = n; i<=y.size()-1; i++){
            res.push_back(y[i]);
        }
    }

    reverse(res.begin(), res.end());

    for(int i = 0; i<=res.size()-1; i++){
        cout<<res[i];
    }
    cout<<endl;

}