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

int main()
{

    int x,y;
    cin >> x >> y;
    vector<int>x1,y1,izlaz;
    int x2 = x;
    int y2 = y;
    int bx = 0;
    int by = 0;
    while(x>0)
    {
        x1.push_back(x%10);
        x = x/10;
        bx ++;
    }
    while(y>0)
    {
        y1.push_back(y%10);
        y = y/10;
        by++;
    }
    for ( int i = 0 ; i < min(bx,by) ; i ++ )
    {
        if ( x1[i] == y1[i])
        {
            izlaz.push_back(x1[i]);
            izlaz.push_back(y1[i]);
        }
        else
            izlaz.push_back(max(x1[i],y1[i]));
    }
    if ( bx > by )
    {
        for ( int i = by ; i < bx ; i++)
            izlaz.push_back(x1[i]);
    }
    else if ( bx < by )
    {
        for ( int i = bx ; i < by ; i++)
            izlaz.push_back(y1[i]);
    }
    for ( int i = izlaz.size() - 1 ; i >= 0 ; i-- )
        cout << izlaz[i];

	return 0;
}