bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;


public class test  {

public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
String s1=sc.nextLine();
String s2=sc.nextLine();
ArrayList<String> arr1=new ArrayList();
ArrayList<String> arr2=new ArrayList();
char[] ch1=new char[s1.length()];
char[] ch2=new char[s2.length()];
char[] ch3=new char[s2.length()];
for(int i=0;i<s1.length();i++){
	ch1[i]=s1.charAt(i);
	ch2[i]=s2.charAt(i);
	
}
Arrays.sort(ch1);
Arrays.sort(ch2);
int chance2=s1.length()/2;
int chance1=s1.length()-chance2;
int k1=0; int l1=chance1-1;
int k2=s1.length()-chance2; int l2=s1.length()-1;
int k3=0; int l3=s1.length()-1;
int u=0;

while(k3<=l3){
	if(u%2==0){
		if(ch1[k1]>=ch2[l2]){
			ch3[l3]=ch1[l1]; l1--; l3--;
		}else{
			ch3[k3]=ch1[k1]; k1++; k3++;
		}
		
	}else{
		if(ch2[l2]<=ch1[k1]){
			ch3[l3]=ch2[k2]; l3--; k2++;
		}
		else{
			ch3[k3]=ch2[l2]; l2--; k3++;
		}
	}u++;
}
for(int i=0;i<s1.length();i++){
	System.out.print(ch3[i]);
}

}}
