#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    string x, y, tmp; string z;
    
    cin >> x >> y;
    
    int a = x.length(); int b = y.length();
    int n = abs(a-b);
    
    if(x.length() == y.length())
    {
        for(int i = 0;i < x.length();i ++)
        {
            if(x[i] == y[i])
            {
                cout << x[i] << y[i]; 
            }
            else
            if(x[i] > y[i])
            {
                cout << x[i];
            }
            else
            {
                cout << y[i];
            }
        }
    }
    else
    if(x.length() > y.length())
    {
       z = y;
       z.insert(0, n, ' ');
       
        for(int i = 0;i < x.length();i ++)
        {
            if(x[i] == z[i])
            {
                cout << x[i] << z[i]; 
            }
            else
            if(x[i] > z[i])
            {
                cout << x[i];
            }
            else
            {
                cout << z[i];
            }
        }
    }
    else
    if(y.length() > x.length())
    {
       z = x;
       z.insert(0, n, ' ');
       
        for(int i = 0;i < y.length();i ++)
        {
            if(y[i] == z[i])
            {
                cout << y[i] << z[i]; 
            }
            else
            if(y[i] > z[i])
            {
                cout << y[i];
            }
            else
            {
                cout << z[i];
            }
        }
    }
    
    
    return 0;
}