#include <bits/stdc++.h>

using namespace std;

string u_string(int n)
{
   string str;
   stringstream ss;
   ss << n;
   ss >> str;
   return str;
}

string sudar (int X, int Y)
{
    string res = "";

    while(max(X, Y) > 0)
    {
        int C = X % 10, T = Y % 10;
        if (C > T)
        {
            res = u_string(C) + res;
        }
        if (C == 0 && T == 0)
        {
            res = u_string(C) + res;
        }
        if (C == T && C != 0 && T != 0)
        {
            res = u_string(C) + u_string(T) + res;
        }
        else if (T > C)
        {
            res = u_string(T) + res;
        }
        X /= 10;
        Y /= 10;
    }
    return res;
}

int main()
{
    int X, Y, C = 3; cin >> X >> Y;
    cout << sudar(X, Y) << endl;
    return 0;
}