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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long int x, y;
    vector<int> rez;
    cin >> x >> y;
    while (x > 0 || y > 0)
    {
        if (y == 0)
            y = -1;
        if (x == 0)
            x = -1;
        if (x % 10 > y % 10)
            rez.push_back(x % 10);
        else if (x % 10 < y % 10)
            rez.push_back(y % 10);
        else
        {
            rez.push_back(x % 10);
            rez.push_back(y % 10);
        }
        x = x / 10;
        y = y / 10;
    }
    for (int i = rez.size() - 1; i >= 0; i--)
        cout << rez[i];
}