#include <iostream>
using namespace std;
int main()
{
    int A;
    cin >> A;
    int B;
    cin >> B;
    int C = max(A,B);
    int C1 = C;
    int cifre = 0; 
    while (C1 != 0) {
        C1 /= 10; 
        cifre++; 
    }
    int duz = 1;
    while (cifre > 1) {
        duz *= 10;
        cifre--;
    }
    for (int i = duz; i > 0; i /= 10) {       
        int A1 = ( (A / i) % 10);
        int B1 = ( (B / i) % 10);
        if (A1 > B1) cout << A1;
        else if (A1 < B1) cout << B1;
        else if (A1 == B1 == 0){
                cout << A1;
                cout << B1;
        }
    }
}