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 Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] olegChars = scanner.nextLine().toCharArray();
        char[] igorChars = scanner.nextLine().toCharArray();
        char[] finalString = new char[olegChars.length];
        int n = olegChars.length;
        int olegBeginPosition = 0;
        int igorBeginPosition = 0;

        Arrays.sort(olegChars);
        Arrays.sort(igorChars);
        reverse(igorChars);
        int lastElemPos = n - 1;
        int firstElemPos = 0;
        if (n % 2 == 0) {
            olegChars = Arrays.copyOf(olegChars, n / 2);
            igorChars = Arrays.copyOf(igorChars, n / 2);
        } else {
            olegChars = Arrays.copyOf(olegChars, n / 2 + 1);
            igorChars = Arrays.copyOf(igorChars, n / 2);
        }
        int olegEndPosition = olegChars.length - 1;
        int igorEndPosition = igorChars.length - 1;
        int turn = 1;
        for (int i = 0; i < n; i++) {
            if (turn == 1) {
                if (i == n - 1 || olegChars[olegBeginPosition] <= igorChars[igorEndPosition]) {
                    finalString[firstElemPos] = olegChars[olegBeginPosition];
                    olegBeginPosition++;
                    firstElemPos++;
                } else {
                    finalString[lastElemPos] = olegChars[olegEndPosition];
                    olegEndPosition--;
                    lastElemPos--;
                }
            } else {
                if (i == n - 1 || igorChars[igorEndPosition] >= olegChars[olegBeginPosition]) {
                    finalString[firstElemPos] = igorChars[igorBeginPosition];
                    igorBeginPosition++;
                    firstElemPos++;
                } else {
                    finalString[lastElemPos] = igorChars[igorEndPosition];
                    igorEndPosition--;
                    lastElemPos--;
                }
            }
            turn *= -1;
        }
        System.out.println(String.valueOf(finalString));
    }

    public static void reverse(char[] arr) {
        int n = arr.length;
        for (int i = 0; i < arr.length / 2; i++) {
            char temp = arr[i];
            arr[i] = arr[n - i - 1];
            arr[n - i - 1] = temp;
        }
    }
}


