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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class NamingCompany {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int t = 1;
        for (int i = 0; i < t; i++) {
            solve(sc, pw);
        }
        pw.close();
    }

    static void solve(Scanner in, PrintWriter out){
//        f in the last position means comes first and s in the last position means comes second
//        int n = in.nextInt();
        char[] cf = in.next().toCharArray();
        char[] cs = in.next().toCharArray();
        int n = cs.length;
//        int rems = n / 2, remf = n - n / 2;
        Arrays.sort(cf);
        Arrays.sort(cs);
        cs = new StringBuilder(new String(cs)).reverse().toString().toCharArray();
        char[] ans = new char[n];
        boolean find = true;
        for (int i = 0, l = 0, r = 0; i < n; i++) {
            if (find){// means the Oleg takes his turn
                find = false;
                if (cf[l] < cs[r]){
                   ans[i] = cf[l++];
                }else{
                    if ((n - i) % 2 != 0){
                        ans[i] = cf[l++];
                    }else{
                        int ls = i, re = n - 1;
                        while (ls < re){
                            ans[ls++] = cs[r++];
                            ans[re--] = cf[l++];
                        }
                        break;
                    }
                }
            }else{
                find = true;
                if (cf[l] < cs[r]){
                    ans[i] = cs[r++];
                }else{
                    if ((n - i) % 2 != 0){
                        ans[i] = cs[r++];
                    }else{
                        int ls = i, re = n - 1;
                        while (ls < re){
                            ans[ls++] = cf[l++];
                            ans[re--] = cs[r++];
                        }
                        break;
                    }
                }
            }
        }
        out.println((new String(ans)));
    }
}
