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.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.concurrent.ThreadLocalRandom;

public class c {
	public static void main(String[] args) throws IOException {

		Scanner sc = new Scanner(System.in);
		char[] first = sc.nextLine().toCharArray();
		char[] sec = sc.nextLine().toCharArray();
		shuffleArray(first);
		shuffleArray(sec);
		Arrays.sort(first);
		Arrays.sort(sec);

		int l = first.length;
		char[] ans = new char[l];
		int count = 0;
		int frontPos = 0;
		int lastPos = l - 1;
		int firstCounter = 0;
		int secCounter = l - 1;
		while (frontPos <= lastPos) {
			char firstC = first[firstCounter];
			char secC = sec[secCounter];
			if (count % 2 == 0) { // firstPlayer / smallest

				if (firstC > secC) {
					ans[lastPos] = firstC;
					lastPos--;

				} else {
					ans[frontPos] = firstC;
					frontPos++;

				}
				firstCounter++;
			} else { // second Player large
				if (secC < firstC) {
					ans[lastPos] = secC;
					lastPos--;

				} else {
					ans[frontPos] = secC;
					frontPos++;
				}
				secCounter--;

			}
			count++;

		}
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i < ans.length; i++) {
			sb.append(ans[i]);

		}
		System.out.println(sb.toString());

	}

	static void shuffleArray(char[] ar) {
		Random rnd = ThreadLocalRandom.current();
		for (int i = ar.length - 1; i > 0; i--) {
			int index = rnd.nextInt(i + 1);
			char a = ar[index];
			ar[index] = ar[i];
			ar[i] = a;
		}
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream System) {
			br = new BufferedReader(new InputStreamReader(System));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() {
			for (long i = 0; i < 3e9; i++)
				;
		}
	}
}
