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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Xinyi Tao
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        private int len;

        private int[] readWord(Scanner in) {
            int[] r = new int[26];
            String word = in.next();
            len = word.length();
            for (int i = 0; i < len; i++)
                r[word.charAt(i) - 'a']++;
            return r;

        }

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[] a = readWord(in);
            int[] b = readWord(in);

            int[] r = new int[len];
            int AMinIndex = 0;
            int BMaxIndex = 25;
            int remaining = len;
            int i = 0;
            int start = -1;
            for (i = 0; i < len; i++) {
                while (a[AMinIndex] == 0) AMinIndex++;
                while (b[BMaxIndex] == 0) BMaxIndex--;
                if (i % 2 == 0) {//player A
                    if (AMinIndex < BMaxIndex) {
                        r[i] = AMinIndex;
                    } else {
                        if (start == -1)
                            start = 1;
                        if ((start + remaining) % 2 == 0)
                            r[i] = AMinIndex;
                        else
                            r[i + start * 2 - 1] = AMinIndex;
                    }
                    a[AMinIndex]--;

                } else {//player B
                    if (AMinIndex < BMaxIndex) {
                        r[i] = BMaxIndex;
                    } else {
                        if (start == -1)
                            start = 0;
                        if ((start + remaining) % 2 == 1)
                            r[i] = BMaxIndex;
                        else
                            r[i + 1 - start * 2] = BMaxIndex;
                    }
                    b[BMaxIndex]--;
                }
                remaining--;

            }
            for (i = 0; i < len; i++) {
                out.print((char) ('a' + r[i]));
            }
        }

    }
}

