#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define PI acos(-1)
#define LSB(i) ((i) & -(i))
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define sc second
#define th third
#define fo fourth
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ldb double
#define MOD 1000000007
#define endl "\n"

#define all(data)       data.begin(),data.end()
#define TYPEMAX(type)   std::numeric_limits<type>::max()
#define TYPEMIN(type)   std::numeric_limits<type>::min()
#define ima_li_te(D,d)  find(all(D),d)

int main()
{
    ios::sync_with_stdio(false); cin.tie(0);
    string s1,s2; cin>>s1>>s2;
    vector<int> v1,v2,v;
    for(auto x:s1) v1.pb(x-'0');
    for(auto x:s2) v2.pb(x-'0');
    reverse(all(v1)); reverse(all(v2));
    ll n=v1.size(),m=v2.size();
    for(int i=0;i<min(n,m);i++)
    {
        if(v1[i]==v2[i])
        {
            v.pb(v1[i]);
            v.pb(v2[i]);
        }
        else v.pb(max(v1[i],v2[i]));
    }
    if(n<m)
    {
        for(int i=n;i<m;i++) v.pb(v2[i]);
    }
    else if(m<n)
    {
        for(int i=m;i<n;i++) v.pb(v1[i]);
    }
    reverse(all(v));
    for(auto x:v) cout<<x;
    return 0;
}