#include<iostream>
#include<cmath>
using namespace std;

string X,Y,Z;
int br,br1,Xs,Ys;

int main()
{

   cin >> X >> Y;

   Xs=X.size();
   Ys=Y.size();

   if(Xs >= Ys)
   {
      br1=Xs-Ys;
      br=Xs-1;

      for(int i=1; i<=br1; i++)
      {
         Y.insert(0,"!");
      }

      for(int i=0; i<=br; i++)
      {
         if(X[i]==Y[i])
         {
            Z=Z+X[i];
            Z=Z+Y[i];
         }

         else
         {
            Z=Z+max(X[i],Y[i]);
         }
      }
   }

   else
   {
      br=Ys-1;
      br1=Ys-Xs;

      for(int i=1; i<=br1; i++)
      {
         X.insert(0,"!");
      }

      for(int i=0; i<=br; i++)
      {
         if(X[i]==Y[i])
         {
            Z=Z+X[i];
            Z=Z+Y[i];
         }

         else
         {
            Z=Z+max(X[i],Y[i]);
         }
      }
   }

   cout << Z << endl;
   return 0;
}