#include <iostream>

using namespace std;

int main()
{
    long long int x,y,cX,cY,br = 0,inv = 0;
    cin>>x;
    cin>>y;
    while(x>0 || y>0){
        cX = x%10;
        cY = y%10;
        if(x==0){
            br = br*10 + cY;
        }else if( y == 0){
            br = br*10+ cX;
        }else{
            if(cX>cY){
                br = br*10 + cX;
            }else if(cX<cY){
                br = br*10 + cY;
            }else{
                br = br*100 + cX*10 + cY;
            }
        }
        x = x/10;
        y = y/10;
    }
    while(br>0){
        inv = inv*10 + br%10;
        br = br/10;
    }
    cout<<inv;
    return 0;
}