#include <bits/stdc++.h>

using namespace std;

int main()
{
   int x,y;
   cin>>x>>y;
   if(x<y)
   {
       int p=x;
       x=y;
       y=p;
   }
   int cifrax,cifray,n=0;
   vector<int> ispis;
   while(x!=0)
   {
       cifrax=x%10;
       if(y==0) cifray=-1;
       else cifray=y%10;
       if(cifrax>cifray)
       {
           ispis.push_back(cifrax);
           n+=1;
       }
       else if(cifray>cifrax)
       {
           ispis.push_back(cifray);
           n+=1;
       }
       else
       {
           ispis.push_back(cifrax);
           ispis.push_back(cifray);
           n+=2;
       }
       x/=10;
       y/=10;
   }
   for(int i=n-1; i>=0; i--)
   {
       cout<<ispis[i];
   }
}