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

int main(){
    string x, y;
    cin >> x >> y;
    vector<char> s;

    if(x.size() == y.size()){
        for(int i = 0; i < x.size(); i++){
            if(x[i] > y[i]){
                s.push_back(x[i]);
            }
            else if(x[i] < y[i]){
                s.push_back(y[i]);
            }
            else{
                s.push_back(x[i]); s.push_back(y[i]);
            }
        }
    }
    else{
        if(x.size() > y.size()){
            int a = x.size() - y.size();
            for(int i = 0; i < a; i++){
                s.push_back(x[i]);
            }
            for(int i = 0; i < y.size(); i++){
                if(x[i+a] > y[i]){
                    s.push_back(x[i+a]);
                }
                else if(x[i+a] < y[i]){
                    s.push_back(y[i]);
                }
                else{
                    s.push_back(x[i+a]); s.push_back(y[i]);
                }
            }
        }
        else{
            int b = y.size() - x.size();
            for(int i = 0; i < b; i++){
                s.push_back(y[i]);
            }
            for(int i = 0; i < x.size(); i++){
                if(x[i] > y[i + b]){
                    s.push_back(x[i]);
                }
                else if(x[i] < y[i + b]){
                    s.push_back(y[i + b]);
                }
                else{
                    s.push_back(x[i]); s.push_back(y[i+b]);
                }
            }
        }
    }


    for(int i = 0; i < s.size(); i++){
        cout << s[i];
    }

}