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

typedef unsigned long long ull;

int cif(char c){
    if(c=='*')return -1;
    if(c=='0')return 0;
    if(c=='1')return 1;
    if(c=='2')return 2;
    if(c=='3')return 3;
    if(c=='4')return 4;
    if(c=='5')return 5;
    if(c=='6')return 6;
    if(c=='7')return 7;
    if(c=='8')return 8;
    if(c=='9')return 9;
    return -1;
}

int main()
{
    string x, y; cin >> x >> y;
    if(y.size()>x.size())swap(x,y);
    while(y.size()<x.size()){
        y="*"+y;
    }
    string tmp;
    for(int i=0; i<x.size();i++){
        if(x[i]==y[i]){
            tmp.push_back(x[i]);
            tmp.push_back(y[i]);
        }
        else if(cif(x[i])>cif(y[i])){
            tmp.push_back(x[i]);
        }
        else tmp.push_back(y[i]);
    }
    cout << tmp;
    return 0;
}