#include <iostream>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	int a, b;
	cin >> a >> b;
	
	int c1;
	int c2;

    int broj[1000];
    int n = 0;
    while(a > 1 or b > 1)
    {
        c1 = a % 10;
        c2 = b % 10;

        if(c1 > c2)
        {
        	broj[n] = c1;
        	n++;
        }
        else if(c2 > c1)
        {
        	broj[n] = c2;
        	n++;
        }   
        else
        {
            broj[n] = c1;
            n++;
            broj[n] = c2;
            n++;
        }

        a /= 10;
        b /= 10;
    }
    
    for(int i = n-1; i >= 0; i--)
    {
    	cout << broj[i];
    }
    
    return 0;
}