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

int main()
{
    long long int x,y,cX,cY;
    string br = "",inv ="";

    cin>>x;
    cin>>y;
    while(x>0 || y>0){
        cX = x%10;
        cY = y%10;
        if(x==0){
            br = to_string(cY) + br;
        }else if( y == 0){
            br = to_string(cX) + br;
        }else{
            if(cX>cY){
                br = to_string(cX) + br;
            }else if(cX<cY){
                br = to_string(cY) + br;
            }else{
                br = to_string(cX) + to_string(cY) + br;
            }
        }
        x = x/10;
        y = y/10;
    }
    cout<<br;
    return 0;
}