#include <bits/stdc++.h>

using namespace std;

long long niz1[15];
long long niz2[15];

int main()
{
    string s1,s2;
    cin>>s1>>s2;

    long long n1=s1.size();
    long long n2=s2.size();

    long long maxx=max(n1,n2);

    for (long long i=0;i<n1;i++) niz1[i-n1+1+maxx]=(s1[i]-'0');
    for (long long i=0;i<n2;i++) niz2[i-n2+1+maxx]=(s2[i]-'0');

    for (long long i=1;i<=maxx-n1;i++) niz1[i]=-1;
    for (long long i=1;i<=maxx-n2;i++) niz2[i]=-1;

    for (long long i=1;i<=maxx;i++)
    {
        if (niz1[i]==niz2[i]) cout<<niz1[i]<<niz1[i];
        else cout<<max(niz1[i],niz2[i]);
    }
}