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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Template implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    class GraphBuilder {
        int n, m;
        int[] x, y;
        int index;
        int[] size;


        GraphBuilder(int n, int m) {
            this.n = n;
            this.m = m;
            x = new int[m];
            y = new int[m];
            size = new int[n];
        }

        void add(int u, int v) {
            x[index] = u;
            y[index] = v;
            size[u]++;
            size[v]++;
            index++;
        }

        int[][] build() {
            int[][] graph = new int[n][];
            for (int i = 0; i < n; i++) {
                graph[i] = new int[size[i]];
            }
            for (int i = index - 1; i >= 0; i--) {
                int u = x[i];
                int v = y[i];
                graph[u][--size[u]] = v;
                graph[v][--size[v]] = u;
            }
            return graph;
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readLongArray(int size) throws IOException {
        long[] res = new long[size];
        for (int i = 0; i < size; i++) {
            res[i] = readLong();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Template().run();
        // new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    void rev(char[] x) {
        for (int i = 0; i < x.length / 2; i++) {
            char t = x[i];
            x[i] = x[x.length - 1 - i];
            x[x.length - 1 - i] = t;
        }
    }

    class SegmentTree {
        int[] data;
        int n;

        SegmentTree(int n) {
            this.n = n;
            data = new int[4 * n];
            build(1, 0, n - 1);
        }

        void build(int v, int tl, int tr) {
            if (tl == tr) {
                data[v] = 1;
                return;
            }
            int mid = (tl + tr) >> 1;
            build(v * 2, tl, mid);
            build(v * 2 + 1, mid + 1, tr);
            data[v] = data[v * 2] + data[v * 2 + 1];
        }

        int findK(int v, int tl, int tr, int k) {
            if (tl == tr) {
                data[v] = 0;
                return tl;
            }

            int mid = (tl + tr) >> 1;
            int res;
            if (data[v * 2] >= k) {
                res = findK(v * 2, tl, mid, k);
            } else {
                res = findK(v * 2 + 1, mid + 1, tr, k - data[v * 2]);
            }
            data[v] = data[v * 2] + data[v * 2 + 1];
            return res;
        }

        int findK(int k) {
            return findK(1, 0, n - 1, k);
        }
    }

    String solveClever(char[] a, char[] b) {
        Arrays.sort(a);
        Arrays.sort(b);
        rev(b);
        int n = a.length;
        int movesSecond = n / 2;
        int movesFirst = n - movesSecond;

        SegmentTree segmentTree = new SegmentTree(a.length);

        int posFirst = 0;
        int posSecond = 0;

        char[] result = new char[n];
        Arrays.fill(result, '$');
        for (int i = 0; i < n; i++) {
            int offset;
            char val;
            if (i % 2 == 0) {
                int l = 1;
                int r = movesSecond;
                int res = 0;

                while (l <= r) {
                    int mid = (l + r) >> 1;
                    if (b[posSecond + mid - 1] > a[posFirst]) {
                        r = mid - 1;
                    } else {
                        res = mid;
                        l = mid + 1;
                    }
                }
                offset = res;
                val = a[posFirst++];
                movesFirst--;
            } else {
                int l = 1;
                int r = movesFirst;
                int res = 0;

                while (l <= r) {
                    int mid = (l + r) >> 1;
                    if (a[posFirst + mid - 1] < b[posSecond]) {
                        r = mid - 1;
                    } else {
                        res = mid;
                        l = mid + 1;
                    }
                }
                offset = res;
                val = b[posSecond++];
                movesSecond--;
            }
            int index = segmentTree.findK(offset + 1);
            result[index] = val;
        }
        return new String(result);
    }

    void solve() throws IOException {
        char[] a = readString().toCharArray();
        char[] b = readString().toCharArray();
        out.println(solveClever(a.clone(), b.clone()));


    }

}