#include <bits/stdc++.h>

#define xx first
#define yy second
#define lb lower_bound
#define ub upper_bound
#define bs binary_search
#define mp make_pair
#define pb push_back
#define popb pop_back
#define ez {cout << "NO\n"; return;}

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef string str;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAX=1e6+3;
int n;

inline void solve(){
    string a, b, c="";
    cin >> a >> b;
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    for(int i=0;i<max(a.size(), b.size());++i){
        if(i>=a.size()) c+=b[i];
        else if(i>=b.size()) c+=a[i];
        else{
            if(a[i]==b[i]){c+=a[i]; c+=b[i];}
            else c+=max(a[i], b[i]);
        }
    }
    reverse(c.begin(), c.end());
    cout << c << "\n";
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    int t=1;
    while(t--) solve();
    return 0;
}