#include <bits/stdc++.h>

using namespace std;

vector<int> prod;

int main()
{
    int x;
    int y;

    cin >> x;
    cin >> y;

    while(x != 0 || y != 0)
    {

        int a = x % 10;
        int b = y % 10;

        if(x == 0)
            prod.push_back(b);
        else if(y == 0)
            prod.push_back(a);
        else if(a > b)
            prod.push_back(a);
        else if(b > a)
            prod.push_back(b);
        else
        {
            prod.push_back(a);
            prod.push_back(b);
        }

        x /= 10;
        y /= 10;
    }

    for(int i = prod.size() - 1; i >= 0; i--)
    {
        cout << prod[i];
    }

    cout << '\n';
    return 0;
}