#include <bits/stdc++.h>
using namespace std;

int main()
{
    int x, y; cin >> x >> y;
    vector<int> zz;
    while (x != 0 || y != 0) {
        if ((x == 0 && y % 10 == 0) || (y == 0 && x % 10 == 0)) zz.push_back(0);
        else if (x % 10 > y % 10) zz.push_back(x % 10);
        else if (x % 10 < y % 10) zz.push_back(y % 10);
        else if (x % 10 == y % 10) {
            zz.push_back(x % 10);
            zz.push_back(y % 10); }
        x /= 10;
        y /= 10;
    }

    vector<int>::iterator it;
    for (it = zz.end() - 1; it >= zz.begin(); it--)
        cout << *it;

    return 0;
}