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

bccdb
 z
 dfdeed
 aab
 y
 abac

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

public class MyClass {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println(nameCompany(sc.nextLine(), sc.nextLine()));
	}

	public static String nameCompany(String a, String b) {
		int len = a.length();
		int p1moves = len%2 == 0 ? len/2 : len/2 + 1;
		int p2moves = len - p1moves;

		int[] arr1 = new int[26];
		int[] arr2 = new int[26];

		for (char c : a.toCharArray()) {
			arr1[(int)(c - 'a')]++;
		}

		for (char c : b.toCharArray()) {
			arr2[(int)(c - 'a')]++;
		}

		char[] res = new char[len];

		boolean picka = true;

		int i = 0;
		int j = 25;

		while (arr1[i] == 0) {
			i++;
		}

		while (arr2[j] == 0) {
			j--;
		}

		if (j < i) {
			picka = false;
		}

		int clen = len%2 == 0 ? len : len - 1;
		int ad = len%2 == 0 ? 0 : 1;

		while (clen>0) {
			if (picka) {
				while (arr1[i] == 0) {
				 	i++;
				}
				arr1[i]--;
				res[len - clen - ad] = (char)(i + 'a');
				picka = false;
			} else {
				while (arr2[j] == 0) {
					j--;
				}
				arr2[j]--;
				res[len - clen - ad] = (char)(j + 'a');
				picka = true;
			}
			clen--;
		}
		
		if (len%2 != 0) {
			while (arr1[i] == 0) {
				i++;
			}
			
			res[len - 1] = (char)(i + 'a');
		}
		
		return String.valueOf(res);
	}
}









