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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer buffer;

    public static void solve() {
        String s = ns(), t = ns();
        PriorityQueue<Character> s1 = new PriorityQueue<>();
        PriorityQueue<Character> t1 = new PriorityQueue<>(s.length(), Collections.reverseOrder());

        for (int i=0;i<s.length();i++) {
            s1.add(s.charAt(i));
            t1.add(t.charAt(i));
        }

        char[]res = new char[s.length()];
        int start = 0, end = s.length()-1;

        int total=0;
        for (int i=0;total<s.length();i++) {
            if (total<s.length()) {
                char mins = s1.peek(), maxt = t1.peek();
                if (mins<=maxt) {
                    res[start]=mins;
                    start++;
                } else {
                    res[end]=mins;
                    end--;
                }
                s1.poll();
                total++;
            }

            if (total<s.length()) {
                char mins = s1.peek(), maxt = t1.peek();
                if (maxt>=mins) {
                    res[start]=maxt;
                    start++;
                } else {
                    res[end]=maxt;
                    end--;
                }
                t1.poll();
                total++;
            }
        }

        for (Character c: res) out.print(c);

    }


    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    static String next() {
        while (buffer == null || !buffer.hasMoreElements()) {
            try {
                buffer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                //
            }
        }
        return buffer.nextToken();
    }

    static int ni() {
        return Integer.parseInt(next());
    }

    static long nl() {
        return Long.parseLong(next());
    }

    static double nd() {
        return Double.parseDouble(next());
    }

    static String ns() {
        return next();
    }

    static int[] ni(int n) {
        int[] res = new int[n];
        for (int i = 0; i < n; i++)
            res[i] = Integer.parseInt(next());
        return res;
    }

    static long[] nl(int n) {
        long[] res = new long[n];
        for (int i = 0; i < n; i++)
            res[i] = Long.parseLong(next());
        return res;
    }

    static double[] nd(int n) {
        double[] res = new double[n];
        for (int i = 0; i < n; i++)
            res[i] = Double.parseDouble(next());
        return res;
    }

    static String[] ns(int n) {
        String[] res = new String[n];
        for (int i = 0; i < n; i++)
            res[i] = next();
        return res;
    }

    static String nln() {
        try {
            return in.readLine();
        } catch (IOException e) {
            //
        }

        return null;
    }

}