#include <bits/stdc++.h>

using namespace std;
int duz1,duz2,manji,razlika;
deque <char> q;
string x,y,nov;
int main(){
   cin>>x>>y;
   duz1=x.size();
   duz2=y.size();
   manji=min(duz1,duz2);
   int korekcija=0;
   reverse(x.begin(), x.end());
   reverse(y.begin(), y.end());
   for (int i=0;i<manji;i++){
      if (x[i]>y[i]){
        q.push_front(x[i]);
      }
      else if (y[i]>x[i]){
             q.push_front(y[i]);
           }
           else {
             q.push_front(x[i]);
             q.push_front(y[i]);
             korekcija++;
           }
   }
   reverse(x.begin(), x.end());
   reverse(y.begin(), y.end());
   if (duz1>duz2) {
     razlika=duz1-duz2;
     nov=x;
   }
   else {
     razlika=duz2-duz1;
     nov=y;
   }
   for (int i=0;i<razlika;i++){
      cout<<nov[i];
   }
   for (int i=1;i<=manji+korekcija;i++){
      cout<<q.front()-48;
      q.pop_front();
   }
   return 0;
}