#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
    unsigned long long a, b;
    cin >> a >> b;
    string s = "";
    while (a >= 1 or b >= 1)
    {
        if (b < 1)s += char(48 + a % 10);
        else if (a < 1)s += char(48 + b % 10);
        else if (a % 10 > b % 10)s += char(48 + a % 10);
        else if (a % 10 == b % 10) {
            s += char(48 + a % 10);
            s += char(48 + a % 10);
        }
        else s += char(48 + b % 10);
        a /= 10;
        b /= 10;
    }
    reverse(s.begin(), s.end());
    cout << s;
    return 0;
}