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.io.OutputStream;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.File;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.UnsupportedEncodingException;
import java.io.InputStream;

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

    static class TaskC {
        int n;

        int[] read(FastReader in) {
            String s = in.next();
            int[] ret = new int[26];
            n = s.length();
            for (int i = 0; i < s.length(); i++) {
                ret[s.charAt(i) - 'a']++;
            }
            return ret;
        }

        public void solve(int testNumber, FastReader in, OutputWriter out) {
            int[] a = read(in);
            int[] b = read(in);
            int left = 0, right = n - 1;
            char[] res = new char[n];
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    int min = 0, max = 25;
                    while (a[min] == 0) ++min;
                    while (b[max] == 0) --max;
                    if (min < max) {
                        res[left++] = (char) (min + 'a');
                        --a[min];
                    } else {
                        int rest = (n - i + 1) / 2;
                        while (a[min] <= rest) {
                            rest -= a[min];
                            ++min;
                        }
                        res[right--] = (char) (min + 'a');
                        --a[min];
                    }
                } else {
                    int min = 0, max = 25;
                    while (a[min] == 0) ++min;
                    while (b[max] == 0) --max;
                    if (min <= max) {
                        res[left++] = (char) (max + 'a');
                        --b[max];
                    } else {
                        int rest = (n - i + 1) / 2;
                        while (b[max] <= rest) {
                            rest -= b[max];
                            --max;
                        }
                        res[right--] = (char) (max + 'a');
                        --b[max];
                    }
                }
            }
            out.println(new String(res));
        }

    }

    static class FastReader {
        BufferedReader reader;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String line = reader.readLine();
                    if (line == null) {
                        return null;
                    }
                    st = new StringTokenizer(line);
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream os, boolean autoFlush) {
            super(os, autoFlush);
        }

        public OutputWriter(Writer out) {
            super(out);
        }

        public OutputWriter(Writer out, boolean autoFlush) {
            super(out, autoFlush);
        }

        public OutputWriter(String fileName) throws FileNotFoundException {
            super(fileName);
        }

        public OutputWriter(String fileName, String csn) throws FileNotFoundException, UnsupportedEncodingException {
            super(fileName, csn);
        }

        public OutputWriter(File file) throws FileNotFoundException {
            super(file);
        }

        public OutputWriter(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException {
            super(file, csn);
        }

        public OutputWriter(OutputStream out) {
            super(out);
        }


        public void flush() {
            super.flush();
        }


        public void close() {
            super.close();
        }

    }
}

