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

bccdb
 z
 dfdeed
 aab
 y
 abac



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author mohanad
 *
 */
public class C {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String s1 = bf.readLine();
		String s2 = bf.readLine();
		n = s1.length();
		int cnt1[]=new int [26],cnt2[]=new int [26];
		for (int i = 0 ;i<n ; ++i){
			++cnt1[s1.charAt(i)-97];
			++cnt2[s2.charAt(i)-97];
		}
		StringBuilder ans=new StringBuilder();
		
		int i=0;
		while (i<n){
			++i;
			for (int j = 0 ; j<26 ; ++j){
				if (cnt1[j]>0){
					--cnt1[j];
					ans.append((char)(j+97));
					break;
				}
			}

			if (i==n)
				break;
			for (int j = 25 ; j>=0 ; --j){
				if (cnt2[j]>0){
					--cnt2[j];
					ans.append((char)(j+97));
					break;
				}
			}
			++i;
		}
		System.out.println(ans);

	}

	static int n;
	
	static void solve(String s1 , String s2 , int i , int j , boolean me){
		
		
	}
}
