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

bccdb
 z
 dfdeed
 aab
 y
 abac

//package com.company;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    static int len;

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] a = readWord(sc);
        int[] b = readWord(sc);
        char[] res = new char[len];
        int left = 0;
        int right = len - 1;
        for(int i = 0; i<len; i++){
            if(i%2 == 0){
                int min = 0;
                while(a[min]==0) min++;
                int max = b.length-1;
                while(b[max]==0)max--;
                if(min<max){
                    a[min]--;
                    res[left++] = (char) ('a' + min);
                }
                else{
                    int t = (len - i - 1)/2;
                    while (a[min]<=t){
                        t-=a[min];
                        min++;
                    }
                    res[right--] = (char) ('a' + min);
                }
            }
            else{
                int min = 0;
                while(a[min]==0) min++;
                int max = b.length-1;
                while(b[max]==0)max--;
                if(min<max){
                    b[max]--;
                    res[left++] = (char) ('a' + max);
                }
                else{
                    int t = (len - i - 1)/2;
                    while (b[max]<=t){
                        t-=b[max];
                        max--;
                    }
                    res[right--] = (char) ('a' + max);
                }
            }
        }
        System.out.println(new String(res));
    }
}
