#include <iostream>

using namespace std;

void reverseStr(string& str)
{
    int n = str.length();

    for (int i = 0; i < n / 2; i++)
        swap(str[i], str[n - i - 1]);
}

int main()
{
    string a, b;
    cin >> a >> b;
    reverseStr(b);
    reverseStr(a);
    string temp;
    if(a.length() < b.length()) {
        temp = a;
        a = b;
        b = temp;
    }
    string c = "";
    for(int i = 0; i < (int)b.length(); i++) {
        if(a[i] == b[i]) {
            c = a[i] + c;
            c = a[i] + c;
        }
        else {
            c = max(a[i], b[i]) + c;
        }
    }
    for(int i = (int)b.length(); i < (int)a.length(); i++) {
        c = a[i] + c;
    }
    cout << c;
    return 0;
}