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 EigenFunk
 */
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 {
        int l = 0;

        int[] readWord(String in) {
            l = in.length();
            int[] res = new int[26];
            for (int i = 0; i < in.length(); i++) {
                ++res[in.charAt(i) - 'a'];
            }
            return res;
        }

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[] oleg = readWord(in.next());
            int[] igor = readWord(in.next());
            char[] res = new char[l];

            int left = 0;
            int right = l - 1;

            for (int i = 0; i < l; i++) {
                if (i % 2 == 0) {
                    int min = 0;
                    while (oleg[min] == 0) {
                        ++min;
                    }
                    int max = igor.length - 1;
                    while (igor[max] == 0) {
                        --max;
                    }
                    if (min < max) {
                        --oleg[min];
                        res[left++] = (char) ('a' + min);
                    } else {
                        int togo = (l - i - 1) / 2;
                        while (oleg[min] <= togo) {
                            togo -= oleg[min];
                            ++min;
                        }
//                    --oleg[min];
                        res[right--] = (char) ('a' + min);
                    }
                } else {
                    int min = 0;
                    while (oleg[min] == 0) {
                        ++min;
                    }
                    int max = igor.length - 1;
                    while (igor[max] == 0) {
                        --max;
                    }
                    if (min < max) {
                        --igor[max];
                        res[left++] = (char) ('a' + max);
                    } else {
                        int togo = (l - i - 1) / 2;
                        while (igor[max] <= togo) {
                            togo -= igor[max];
                            --max;
                        }
                        res[right--] = (char) ('a' + max);
                    }
                }
            }
            out.print(res);
        }

    }
}

