#include <bits/stdc++.h>
using namespace std;

vector<int> intuvec(int n)
{
    vector<int> vec;
    while(n>0)
    {
       vec.push_back(n%10);
       n=n/10;
    }

    return vec;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int x,y;
    cin>>x>>y;

    vector<int> vx=intuvec(x);
    vector<int> vy=intuvec(y);

    int dx=vx.size();
    int dy=vy.size();

    int p=0;
    vector<int> ispis;
    while(p<dx and p<dy)
    {
        if(vx[p]>vy[p])
            ispis.push_back(vx[p]);
        else if(vy[p]>vx[p])
            ispis.push_back(vy[p]);
        else
        {
            ispis.push_back(vx[p]);
            ispis.push_back(vx[p]);
        }
        p++;
    }

    int q=p;
    while(q<dx)
    {
        ispis.push_back(vx[q]);
        q++;
    }

    int r=p;
    while(r<dy)
    {
        ispis.push_back(vy[r]);
        r++;
    }

    for(int i=ispis.size()-1;i>=0;i--)
    {
        cout<<ispis[i];
    }

    return 0;
}