#include<iostream>

using namespace std;

int main(){
    int x, y;
    cin >> x >> y;
    int n = 0, cx, cy;
    while(x > 0 || y > 0){
        cx = x % 10;
        cy = y % 10;
        if(cx > cy){
            n *= 10;
            n += cx;
        }
        else if(cy > cx){
            n *= 10;
            n += cy;
        }
        else if(cx == cy){
            n *= 100;
            n += (cx*10 + cx);
        }
        n /= 10;
    }
    cout << n << "\n";
    return 0;
}