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

bccdb
 z
 dfdeed
 aab
 y
 abac

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

public class App {

	private static char[] ol;
	private static char[] al;
	private static char[] out;
	private static int o;
	private static int a;
	private static int or;
	private static int ar;
	private static int f;
	private static int e;

	public static void main(String[] args) {
		Scanner inp = new Scanner(System.in);
		ol = inp.nextLine().toCharArray();
		al = inp.nextLine().toCharArray();
		Arrays.sort(ol);
		Arrays.sort(al);
		int n = ol.length;
		out = new char[n];
		o = 0;
		or = n - 1;
		a = n - 1;
		ar = 0;
		f = 0;
		e = n - 1;
		for (int i = 0; i < n; i++) {
			if (i % 2 == 0) {
				oleg();
			} else {
				alex();
			}
		}
		for (int i = 0; i < n; i++) {
			System.out.print(out[i]);
		}
		System.out.println();
		inp.close();
	}

	private static void oleg() {
		if (ol[o] <= al[a]) {
			out[f] = ol[o];
			f++;
			o++;
		} else {
			if (or == ol.length - 1) {
				int emp = e - f + 1;
				if (emp % 2 != 0) {
					emp = emp / 2 + 1;
				} else {
					emp = emp / 2;
				}
				or = o + emp - 1;
			}
			out[e] = ol[or];
			e--;
			or--;
		}
	}

	private static void alex() {
		if (al[a] >= ol[o]) {
			out[f] = al[a];
			f++;
			a--;
		} else {
			if(ar == 0){
				int emp = e - f + 1;
				if (emp % 2 != 0) {
					emp = emp / 2 + 1;
				} else {
					emp = emp / 2;
				}
				or = a - emp + 1;
			}
			out[e] = al[ar];
			e--;
			ar++;
		}
	}

}
