#include <bits/stdc++.h>
#define pb push_back
#define xx first
#define yy second
#define ll long long
#define all(x) (x).begin(),(x).end()

using namespace std;

int main(){
    string a, b, s="";
    cin>>a>>b;
    reverse(all(a));
    reverse(all(b));
    if(b.size()<a.size()) swap(a, b);
    for(int i=0; i<a.size(); i++){
        if(a[i]>b[i]) s.pb(a[i]);
        else if(a[i]<b[i]) s.pb(b[i]);
        else{
            s.pb(a[i]);
            s.pb(b[i]);
        }
    }
    for(int i=a.size(); i<b.size(); i++)
        s.pb(b[i]);
    reverse(all(s));
    cout<<s;
    return 0;
}