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

bccdb
 z
 dfdeed
 aab
 y
 abac


import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.next();
        String s2 = sc.next();
        int n = s2.length();
        char[] c1 = new char[n];
        char[] c2 = new char[n];
        for (int i = 0; i < n; i++) {
            c1[i] = s1.charAt(i);
            c2[i] = s2.charAt(i);
        }
        String ans = "";
        Arrays.sort(c1);
        Arrays.sort(c2);
        int i = 0;
        int j = n - 1;
        int h = 0;
        while (c1[i] < c2[j] && i - 1 < j) {
            if (h % 2 == 0) {
                ans += c1[i];
                i += 1;
                h = 1;
            } else {
                ans += c2[j];
                j -= 1;
                h = 0;
            }
        }
        int t;
        int a;
        if(n - j + 1 < i){
            j = i - 1;
        }
        else j = i;
        String l = "";
        while (i + j < n) {
            t = (n - i - j);
            a = (t - 1) / 2 + 1;
            if (j < i) {
                l += c2[a + j];
                j += 1;
            }
            else {
                l += c1[a + i];
                i += 1;
            }
        }
        String b = new StringBuffer(l).reverse().toString();
        System.out.print(ans + b);

    }

    static class Timeline implements Comparable<Timeline> {
        int money;
        int id;

        @Override
        public int compareTo(Timeline o) {
            if (money != o.money) return o.money - money;
            return id - o.id;

        }
    }
}