#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( X > 0 || Y > 0 )
    {
        int C = X % 10, T = Y % 10;
        if (C > T)
        {
            res = u_string(C) + res;
        }
        else if (C == T)
        {
            res = u_string(C) + u_string(T) + res;
        }
        else
        {
            res = u_string(T) + res;
        }
        X /= 10;
        Y /= 10;
    }
    return res;
}

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