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

bccdb
 z
 dfdeed
 aab
 y
 abac

/*
ID: mchensd
LANG: JAVA
PROG: NamingCompany
 */

/**
 *
 * @author Michael
 */
import java.util.*;
import java.io.*;

public class NamingCompany {

    static int len;

    public static int[] readWord(String s) {
        int[] res = new int[26];
        for (int i = 0; i < s.length(); ++i) {
            ++res[s.charAt(i) - 'a'];

        }
        len = s.length();
        return res;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br;
        StringTokenizer st;
        PrintWriter out;

        br = new BufferedReader(new InputStreamReader(System.in));

        int[] a = readWord(br.readLine());
        int[] b = readWord(br.readLine());
//        System.out.println(Arrays.toString(a));
        char[] ans = new char[len];

        int left = 0, right = len - 1;
//        System.out.println(len);
        for (int i = 0; i < len; ++i) {
            int min = 0;
            while (a[min] == 0) {
                ++min;
            }
            int max = 25;
            while (b[max] == 0) {
                --max;
            }
//            System.out.println(min);
//            System.out.println(max);
            if (i % 2 == 0) {
                if (min < max) { // axxx, aaax
                    ans[left++] = (char) ('a' + min);
                    --a[min];
//                    System.out.println("Player 1 put down " + ans[left - 1]);

                } else {
                    int togo = (int) Math.ceil((right - left + 1) * 1.0 / 2);
                    int k = -1;
                    int last = 0;
                    while (togo > 0) {
                        ++k;
                        /*
                        if (k > 25) {
                            k = last;
                            break;
                        }*/
                        if (a[k] > 0) { 
                            togo -= a[k];
                            last = k;
                        }
                        
                    }
                    ans[right--] = (char) ('a' + k);
                    --a[k];
//                    System.out.println("Player 1 put down " + ans[right + 1]);

                }
            } else {
                if (min < max) {
                    ans[left++] = (char) ('a' + max);
                    --b[max];
//                    System.out.println("Player 2 put down " + ans[left - 1]);

                } else {
                    int togo = (int) Math.ceil((right - left + 1) * 1.0 / 2);
                    int k = 26;
                    int last = 0;
                    while (togo > 0) {
                        --k;
                        /*
                        if (k < 0) {
                            k = last;
                            break;
                        }*/
                        if (b[k] > 0) {
                            togo -= b[k]; // ammoo, bccdd
                            last = k;
                        }

                    }
                    ans[right--] = (char) ('a' + k);
                    --b[k];
//                    System.out.println("Player 2 put down " + ans[right + 1]);

                }
            }
            
            
        }
        out = new PrintWriter(System.out);
        out.println(new String(ans));
        out.close();
    }

}
