#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

ll x, y, Nx, Ny, i, j, Cx, Cy;
string rez = "";

ll Duzina(ll n)
{
    ll rez = 0;
    while(n > 0)
    {
        rez++;
        n /= 10;
    }
    return rez;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    cin >> x >> y;
    Nx = Duzina(x);
    Ny = Duzina(y);
    i = min(Nx, Ny);
    while(i--)
    {
        Cx = x % 10;
        Cy = y % 10;
        if(Cx > Cy)
        {
            rez += Cx + '0';
        }
        else if(Cx < Cy)
        {
            rez += Cy + '0';
        }
        else
        {
            rez += Cx + '0';
            rez += Cx + '0';
        }
        x /= 10;
        y /= 10;
    }
    if(y > x) x = y;
    while(x > 0)
    {
        rez += (x % 10) + '0';
        x /= 10;
    }
    reverse(rez.begin(), rez.end());
    cout << rez;
    return 0;
}