#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
using namespace std;
const int N = 2e5 + 2;
const int inf = 2e9;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string a, b;
    cin >> a >> b;
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    string c;
    int i;
    for (i = 0; i < min(a.size(), b.size()); i++) {
        if (a[i] > b[i]) c += a[i];
        if (a[i] < b[i]) c += b[i];
        if (a[i] == b[i]) {
            c += a[i];
            c += b[i];
        }
    }
    while (i < a.size()) c += a[i++];
    while (i < b.size()) c += b[i++];
    reverse(c.begin(), c.end());
    cout << c << en;
    return 0;
}