#include <bits/stdc++.h>
# define endl            '\n'
# define clr(x,a)        memset(x,a,sizeof(x))
# define vi              vector<int>
# define all(a)          a.begin(), a.end()
# define deb(x)          cout<<#x<<"=="<<x<<endl;
# define pb              push_back
# define sc              scanf
# define pr              printf
# define tc              int t; cin>>t; while(t--)
# define rev(s)          reverse(s.begin(),s.end())
# define linija          cout<<"___________\n";
# define sza(x)          (int)x.size()
using namespace std;
typedef long long ll;
const int mxN=200005, mxM=200005, mod=1e9+7, LOG=30;
template<typename T> T nzd(T a, T b){if(b==0) return a;else return nzd(b, a%b);}
template<typename T> T nzs(T a, T b){return(a*(b/nzd(a,b)));}
template<typename T> T stepenuj(T e, T n){T x=1,p=e;while(n){if(n&1)x=(x*p)%mod;p=(p*p)%mod;n>>=1;}return x;}
template<typename T> inline T na2(T x){return x*x;}
int x, y, xp, yp;
string s;

int main(){
   cin>>x>>y;
   while(x>0 || y>0){
      yp=y%10;
      xp=x%10;
      if(x==0) s.pb(yp+'0');
      else if(y==0) s.pb(xp+'0');
      else if(xp==yp){
         s.pb(xp+'0');
         s.pb(yp+'0');
      }
      else{
         if(xp>yp) s.pb(xp+'0');
         else s.pb(yp+'0');
      }
      y/=10;
      x/=10;
   }
   rev(s);
   cout<<s<<endl;
	return 0;
}