#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
// ako mi ne prodje zbog stringa bice svasta
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n1, n2;
    char c1, c2;
    string ans="";
    cin >> n1 >> n2;
    while(n1>0 && n2 >0)
    {
        c1 = (char)((n1%10)+'0');
        c2 = (char)((n2%10)+'0');
        if(c1-'0'>c2-'0')
        {
            ans += c1;
        }
        else if(c2-'0'>c1-'0')
        {
            ans += c2;
        }
        else if(c1-'0' == c2-'0')
        {
            ans += c1;
            ans += c2;
        }
        n1/=10;
        n2/=10;
    }
    while(n1>0)
    {
        c1 = (char)((n1%10)+'0');
        ans += c1;
        n1/=10;
    }
    while(n2>0)
    {
        c2 = (char)((n2%10)+'0');
        ans += c2;
        n2/=10;
    }
    reverse(ans.begin(), ans.end());
    cout << ans;

}