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

public class Main {
    public static void main(String args[]){
        Scanner scanner=new Scanner(System.in);
        String s=scanner.next();
        char []oleg=s.toCharArray();
        s=scanner.next();
        char []igor=s.toCharArray();
        Arrays.sort(oleg);
        Arrays.sort(igor);
        int oo=0;
        int ii=igor.length-1;
        StringBuilder result=new StringBuilder();
        for(int i=0;i<oleg.length;i++){
            result.append('?');
        }
        for(;oo<oleg.length/2;){
            if(oleg[oo]<=igor[ii]) {
                for(int j=0;j<result.length();j++){
                    if(result.charAt(j)=='?'){
                        result.setCharAt(j,oleg[oo]);
                        break;
                    }
                }
            }
            else {
                for(int j=result.length()-1;j>=0;j--){
                    if(result.charAt(j)=='?'){
                        result.setCharAt(j,oleg[oo]);
                        break;
                    }
                }
            }
            oo++;
            if(igor[ii]>oleg[oo]){
                for(int j=0;j<result.length();j++){
                    if(result.charAt(j)=='?'){
                        result.setCharAt(j,igor[ii]);
                        break;
                    }
                }
            }
            else{
                for(int j=result.length()-1;j>=0;j--){
                    if(result.charAt(j)=='?'){
                        result.setCharAt(j,igor[ii]);
                        break;
                    }
                }
            }
            ii--;
        }
        if(oo*2!=oleg.length) {
                for(int j=0;j<result.length();j++){
                    if(result.charAt(j)=='?'){
                        result.setCharAt(j,oleg[oo]);
                        break;
                    }
                }
        }
        System.out.println(result);

    }
}