#include<bits/stdc++.h>
using namespace std;
int main(){
	string s1,s2;
	cin>>s1>>s2;
	if(s1.size()<s2.size()) swap(s1,s2);
	string res = "";
	int x = s1.size()-s2.size();
	for(int i=0;i<x;i++) res.push_back(s1[i]);
	for(int i=x;i<s1.size();i++){
		int a = s1[i]-'0';
		int b = s2[i-x] - '0';
		if(a>b) res.push_back(s1[i]);
		else if(b>a) res.push_back(s2[i-x]);
		else if(a==b){
			res.push_back(s1[i]);
			res.push_back(s2[i-x]);
		}
}
	cout<<res;
}