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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.util.*;
import java.io.*;

public class File {
	
	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e) {
					e.printStackTrace();
				}
			}
			
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
		
		String s1 = sc.next();
		int[] olegCount = new int[26];
		for (char c : s1.toCharArray()) {
			olegCount[c-'a']++;
		}
		
		String s2 = sc.next();
		int[] igorCount = new int[26];
		for (char c : s2.toCharArray()) {
			igorCount[c-'a']++;
		}
		
		LinkedList<Character> olegList = new LinkedList<>(); // Smallest
		LinkedList<Character> igorList = new LinkedList<>(); // Largest
		
		int N = s1.length();
		
		// Get N / 2 smallest for oleg.
		int half = (N + 1) / 2;	
		int count = 0;
		
		for (char c = 'a'; c <= 'z'; c++) {
			if (olegCount[c-'a'] > 0) olegList.addLast(c);
			
			int takenCount = Math.min(olegCount[c-'a'], half - count);
			count += takenCount;
			olegCount[c-'a'] = takenCount;
			
			if (count >= half) {
				break;
			}
		}
		
		// Get N / 2 largest for igor only. If odd, igor will place 1 less than oleg in result.
		half = N / 2;
		count = 0;
		
		for (char c = 'z'; c >= 'a'; c--) {
			if (igorCount[c-'a'] > 0) igorList.addFirst(c);
			
			int takenCount = Math.min(igorCount[c-'a'], half - count);
			count += takenCount;
			igorCount[c-'a'] = takenCount;
			
			if (count >= half) {
				break;
			}
		}
		
		// out.println(olegList);
		// out.println(igorList);
		
		
		char[] res = new char[N];
		
		int left = 0;
		int right = N-1;
		
		for (int i = 0; i < N; i++) {
			if (i % 2 == 0) { // Oleg turn. Make it smallest possible.
				// Will always add letters in increasing order.
				char placed = 'a';
			
				// CASES							
				// Empty list
				if (igorList.isEmpty()) {
					res[left++] = olegList.getFirst();
					placed = olegList.getFirst();
				}
				// Avoid them placing to leftmost. Fill leftmost with smallest.
				else if (igorList.getLast() > olegList.getFirst()) {					
					res[left++] = olegList.getFirst();
					placed = olegList.getFirst();
				}
				// Oleg has the worst one. Fill it at the end.
				else if (olegList.getLast() >= igorList.getLast()) { 
					res[right--] = olegList.getLast();
					placed = olegList.getLast();
				}				
				else if (olegList.getFirst() <= igorList.getFirst()) { // HERE
					res[left++] = olegList.getFirst();
					placed = olegList.getFirst();
				}
				else {					
					res[right--] = olegList.getLast();
					placed = olegList.getLast();
				}
				
				// Update count.
				// Remove if count becomes 0.
				olegCount[placed-'a']--;
				if (olegCount[placed-'a'] == 0) {
					if (olegList.getFirst() == placed) {
						olegList.removeFirst();
					}
					else {
						olegList.removeLast();
					}
				}
			}
			else { // Igor turn. Make it largest possible.
				// Will always add letters in decreasing order.
				char placed = 'a';
			
				// CASES
				// Has the largest character among them both.
					// Place it at the leftmost position.
				if (olegList.isEmpty()) {
					res[left++] = igorList.getLast();
					placed = igorList.getLast();
				}
				else if (olegList.getFirst() < igorList.getLast()) {
					res[left++] = igorList.getLast();
					placed = igorList.getLast();
				}
				// Igor has the smallest one, place at the end.
				else if (igorList.getFirst() <= olegList.getFirst()) {
					res[right--] = igorList.getFirst();
					placed = igorList.getFirst();
				}
				else if (igorList.getLast() >= olegList.getLast()) {
					res[left++] = igorList.getLast();
					placed = igorList.getLast();
				}
				else {
					res[right--] = igorList.getFirst();
					placed = igorList.getFirst();
				}
				
				// Update count.
				// Remove if count becomes 0.
				igorCount[placed-'a']--;
				if (igorCount[placed-'a'] == 0) {
					if (igorList.getFirst() == placed) {
						igorList.removeFirst();
					}
					else {
						igorList.removeLast();
					}
				}
			}
		}
		
		out.println(new String(res));
		out.close();
	}
}