#include <iostream>

using namespace std;

int main()
{
    int x,y;
    cin >> x >> y;
    int z=0;
   int px,py;
    while(x!=0 || y!=0)
    {
      z*=10;
      if(x!=0)
       px=x%10;
      else
       px=-1;
     if(y!=0)
       py=y%10;
      else
       py=-1;

      if(px != py)
      {
        if(px > py)
        z+=px;
        else
        z+=py;
      }
      else
      {
          z*=10;
        z+=px*10 + px;
      }


    x/=10;
    y/=10;
    }

    while(z!=0)
    {
        cout<<z%10;
        z/=10;
    }


    return 0;
}