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

string x, y, broj;
int pos;

int main()
{   
    cin >> x >> y;
    
    int g = max(x.size(), y.size());
    
    if(x.size() < y.size()) swap(x, y);
    
    while(x.size() > y.size())
        y = ',' + y;
    
    
    for(int j = 0; j < g; j++)
    {
        if(x[j] > y[j])
            broj.push_back(x[j]);
        else if(x[j] < y[j])
            broj.push_back(y[j]);
        else if (x[j] == y[j]){
            broj.push_back(x[j]);
            broj.push_back(x[j]);
        }
    }
    
    cout << broj << endl;
    
    return 0;
}