#include <iostream>
#include <string>

#define ll long long

using namespace std;

ll a, b;
string ress="", r="";

int main() {
    cin>>a>>b;

    while (a || b)
    {
        if (a==0) ress+=(char)(b%10 + '0');
        else if (b==0) ress+=(char)(a%10 + '0');
        else if ((a%10)>(b%10)) ress+=(char)(a%10 + '0');
        else if ((a%10)<(b%10)) ress+=(char)(b%10 + '0');
        else { ress+=(char)(a%10 + '0'); ress+=(char)(a%10 + '0'); }

        a/=10; b/=10;
    }

    for (int i=0; i<ress.size(); i++) r+=ress[ress.size()-i-1];

    cout<<r;

}