#include<bits/stdc++.h>

using namespace std;
    
int main(){
	
	string s1;
	cin >>s1;
	string s2;
	cin>>s2;
	string rez1="";
	string rez2="";
	//cout<<s1.size()<<" "<<s2.size()<<"\n";
	int n=min(s1.size(),s2.size());
	if(s1.size()>=s2.size()){
		int x=s1.size()-s2.size();
		//cout<<x;
		for(int i=0; i <x;i++)rez1+=s1[i];
		for(int i=0; i < n;i++){
			if(s1[i+x]>s2[i])rez2+=s1[i+x];
			else if(s1[i+x]<s2[i])rez2+=s2[i];
			else {rez2+=s2[i]; rez2+=s2[i];}
		}
	}
	else if(s2.size()>s1.size()){
		int x=s2.size()-s1.size();
		//cout<<x;
		for(int i=0; i <x;i++)rez1+=s2[i];
		for(int i=0; i < n;i++){
			if(s2[i+x]>s1[i])rez2+=s2[i+x];
			else if(s2[i+x]<s1[i])rez2+=s1[i];
			else {rez2+=s1[i]; rez2+=s1[i];}
		}

	}
	cout<<rez1;
	cout<<rez2;

}