#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long lond
#define lli long long int
using namespace std;
string s,s1,r;
void dodaj(){
   ll k=s.size()-1;
   ll k1=s1.size()-1;
   if (k1>k){
      reverse(s.begin(),s.end());
      while(k1!=k){
         s+='0';
         k1--;
      }
      reverse(s.begin(),s.end());

   }
   else if (k1<k){
      reverse(s1.begin(),s1.end());
      while(k!=k1){
         s1+='0';
         k1--;
      }
      reverse(s1.begin(),s1.end());
   }
}
int main() {
   cin >> s >> s1;
   dodaj();
   ll si=s.size();
   for (int i=0;i<si;i++){
      if (s[i]==s1[i]){
         r+=s[i];
         r+=s1[i];
      }
      else if (s[i]-48>s1[i]-48){
         r+=s[i];
      }
      else r+=s1[i];
   }
   cout << r << endl;
   return 0;
}