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

bccdb
 z
 dfdeed
 aab
 y
 abac


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created by imahmoud on 5/14/17.
 */
public class C {
    public char giveMeChar(int[] st, boolean isLexicographically){
        if(isLexicographically){
            for (int i = 0; i < st.length; i++) {
                if(st[i] == 0)
                    continue;
                else {
                    st[i]--;
                    return (char) (97 + i);
                }
            }
        }else{
            for (int i = st.length-1; i >= 0; i--) {
                if(st[i] == 0)
                    continue;
                else {
                    st[i] --;
                    return (char) (97 + i);
                }
            }
        }
        return '?';
    }
    public List<Character> getList(int[] set, int n, boolean isLexicographically){
        List<Character> list = new ArrayList<>();
        if(isLexicographically) {
            for (int i = 0; i < set.length && n > 0; i++) {
                if (set[i] > 0) {
                    set[i]--;
                    list.add((char) (i + 97));
                    i--;
                    n--;
                }
            }
        }else{
            for (int i = set.length -1 ; i >= 0 && n>0 ; i--) {
                if (set[i] > 0) {
                    set[i]--;
                    list.add((char) (i + 97));
                    i++;
                    n--;
                }
            }
        }
        return list;
    }
    int[] shift_to_values(int[] set, int left, int right){
        for (; left < set.length; left++) {
            if(set[left] !=0 ){
                break;
            }
        }

        for ( ; right >= 0; right--) {
            if(set[right] != 0 ){
                break;
            }
        }
        return new int[]{left, right};
    }
    public void solve(){
        Scanner in =  new Scanner(System.in);

        String s1 = in.next();
        String s2 = in.next();

        int[] set1 = new int[28];
        int[] set2 = new int[28];

        for (int i = 0; i < s1.length(); i++) {
            set1[s1.charAt(i) - 97] ++;
        }

        for (int i = 0; i < s2.length(); i++) {
            set2[s2.charAt(i)-97] ++;
        }

        char[] res = new char[s1.length()];
        int left =0,right =res.length-1,m1=0,m2=set1.length-1,n1=0,n2=set1.length-1;

        int c = s1.length() % 2 == 0 ? s1.length()/2: s1.length()/2+1;
        for (int i = 0; c > 0; i++) {
            if(set1[i]!=0) {
                if(c < set1[i]){
                    set1[i] = c;
                }
                c-=set1[i];
                n2 = i;
            }
        }
        c = s1.length() / 2;
        for (int i = set2.length-1; c > 0; i--) {
            if(set2[i]!=0) {
                if(c < set2[i]){
                    set2[i] = c;
                }
                c -= set2[i];

                m1 = i;
            }
        }

        for (int i = 0; i < s1.length(); i++) {
            int[] v1 = shift_to_values(set1, n1 , n2);
            n1 = v1[0];
            n2 = v1[1];
            int[] v2 = shift_to_values(set2, m1 , m2);
            m1 = v2[0];
            m2 = v2[1];

            if( i%2 ==0 ){
                if(n1 < m2){
                    res[left] = (char)(n1+97);
                    set1[n1]--;
                    left++;
                }else{
                    res[right] = (char)(n2+97);
                    right--;
                    set1[n2]--;
                }
            }else{
                if(m2 > n1){
                    res[left] = (char)(m2+97);
                    set2[m2]--;
                    left++;
                }else{
                    res[right] = (char)(m1+97);
                    right--;
                    set2[m1]--;
                }
            }
        }
        System.out.print(res);


    }
    public static void main(String[] args) {
        new C().solve();
    }
}
