#include <iostream>

using namespace std;

string returnNum(char a,char b)
{
    if(a < b)
    {
        string t(1,b);return t;
    }
    else if(a == b)
    {
        string t(1,a);string t2(1,b);
        return t+t2;
    }
    string t(1,a);return t;
}

int main() {
    int max;
    string rec1,rec2;
    cin >> rec1;
    cin >> rec2;
    int veci,offset;
    if(rec1.size() == rec2.size())
    {
        offset = 0;veci = 0;max=  rec1.size();
    }
    else if(rec1.size() > rec2.size())
    {
        veci = 1;
        offset = rec1.size() - rec2.size();
        max = rec1.size();
    }
    else
    {
        veci = 2;
        offset = rec2.size() - rec1.size();
        max = rec2.size();
    }
    string num = "";
    for(int i = 0; i < max;i++)
    {
        switch (veci) {
            case 0:
                num.append(returnNum(rec1[i],rec2[i]));
                break;
            case 1:
                num.append(returnNum(rec1[i],rec2[i-offset]));
                break;
            case 2:
                num.append(returnNum(rec1[i+offset],rec2[i]));
                break;
        }
    }
    cout << num;
}