#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	string a, b, s="";
	cin>>a>>b;
	int n, m, i, j;
	n=a.length();
	m=b.length();
	if(m>n){
		i=0;
		while((m-i)!=n){
			s+=b[i];
			i++;
		}
		for(j=0;j<n;j++){
			if(a[j]>b[i+j]){
				s+=a[j];
			}
			else if(a[j]<b[i+j]){
				s+=b[i+j];
			}
			else{
				s+=a[j];
				s+=a[j];
			}
		}
	}
	else if(n>m){
		i=0;
		while((n-i)!=m){
			s+=a[i];
			i++;
		}
		for(j=0;j<m;j++){
			if(a[i+j]>b[j]){
				s+=a[i+j];
			}
			else if(a[j+i]<b[j]){
				s+=b[j];
			}
			else{
				s+=b[j];
				s+=b[j];
			}
		}
	}
	else{
		for(i=0;i<n;i++){
			if(a[i]>b[i]){
				s+=a[i];
			}
			else if(b[i]>a[i]){
				s+=b[i];
			}
			else{
				s+=a[i];
				s+=a[i];
			}
		}
	}
	cout<<s;
	return 0;
}