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

bccdb
 z
 dfdeed
 aab
 y
 abac

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

public class MyClass {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println(nameOfCompany(sc.nextLine(), sc.nextLine()));
	}
	
	public static String nameOfCompany(String a, String b) {
		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')]++;
		}

		int len = a.length();

		char[] res = new char[len];

		boolean picka = true;
		int i = 0;
		int j = 25;

		while (len > 0) {
			if (picka) {
				while(arr1[i] == 0) {
					i++;
				}
				res[res.length - len] = (char)('a' + i);
				arr1[i]--;
				picka = false;
			} else {
				while(arr2[j] == 0) {
					j--;
				}
				res[res.length - len] = (char)('a' + j);
				arr2[j]--;
				picka = true;
			}
			len--;
		}

		return String.valueOf(res);
	}
}