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.util.Arrays;

public class C {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            char[] a = br.readLine().toCharArray();
            char[] b = br.readLine().toCharArray();
            Arrays.sort(a);
            Arrays.sort(b);
            char[] c = new char[a.length];
            int s = 0;
            int e = a.length - 1;
            for (int i = 0, j = 0, k = a.length - 1; i < a.length; ++i) {
                if (i % 2 == 0) {
                    if (b[k] >= a[j]) {
                        c[s] = a[j];
                        s++;
                    } else {
                        c[e] = a[j];
                        e--;
                    }
                    j++;
                } else {
                    if (a[j] <= b[k]) {
                        c[s] = b[k];
                        s++;
                    } else {
                        c[e] = b[k];
                        e--;
                    }
                    k--;
                }
            }
            String ans = new String(c);
            System.out.println(ans);
        } catch (IOException ex) {
        }
    }
}
