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

int main()
{
    int a,b;
    cin>>a>>b;
    vector<int>vek;
    for(;(a>0)||(b>0);)
    {
        int p=a%10,q=b%10;
        if(p>q)
            vek.push_back(p);
        else if(p<q)
            vek.push_back(q);
        else
        {
            vek.push_back(p);
            vek.push_back(p);
        }
        a/=10;
        b/=10;
    }
    for(int i=vek.size()-1;i>=0;i--)
        cout<<vek[i];
    return 0;
}