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;
        }
    }

    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;

        int posFirstLeft = 0;
        int posSecondLeft = 0;
        int posFirstRight = movesFirst - 1;
        int posSecondRight = movesSecond - 1;

        ArrayDeque<Character> start = new ArrayDeque<>();
        ArrayDeque<Character> end = new ArrayDeque<>();

        for (int i = 0; i < n; i++) {
            if (i % 2 == 0) {
                if (a[posFirstLeft] < b[posSecondLeft]) {
                    start.add(a[posFirstLeft++]);
                } else {
                    end.addFirst(a[posFirstRight--]);
                }
            } else {
                if (b[posSecondLeft] > a[posFirstLeft]) {
                    start.add(b[posSecondLeft++]);
                } else {
                    end.addFirst(b[posSecondRight--]);
                }
            }
        }
        start.addAll(end);
        StringBuilder sb = new StringBuilder();
        for (char x : start) {
            sb.append(x);
        }
        return sb.toString();
    }

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


}