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

string dopuni(string a,int n){
    int c = n - a.size();
    reverse(a.begin(),a.end());
    string b = a;
    for(int i = 0;i < c;i++){
        b += '-';
    }
    reverse(b.begin(),b.end());
    return b;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    string a,b;
    string c = "";
    cin >> a >> b;

    int n = min(a.size(),b.size());

    if(a.size() == n) a = dopuni(a,b.size());
    else b = dopuni(b,a.size());

    for(int i = 0;i < a.size();i++){
        if(a[i] == b[i]){
            c += a[i];
            c += a[i];
        }
        else c += max(a[i],b[i]);
    }
    cout << c;
}