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

bccdb
 z
 dfdeed
 aab
 y
 abac

//package com.company;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;


public class Main {

    public static void main(String args[] ) throws Exception {

        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st1 = new StringTokenizer(sc.readLine());
        String  n = st1.nextToken();
        st1 = new StringTokenizer(sc.readLine());
        String t = st1.nextToken();

        ArrayList<Character> l1=new ArrayList<>();
        int lenght=n.length();
        for(int i=0;i<lenght;i++)
            l1.add(n.charAt(i));

        ArrayList<Character> l2=new ArrayList<>();
        for(int i=0;i<lenght;i++)
            l2.add(t.charAt(i));
        Collections.sort(l1);
        Collections.sort(l2);
        StringBuffer ss=new StringBuffer("");
        for(int i=0;i<lenght;i++)
            ss.append("?");
        int start=0;int end=lenght-1;
        for(int i=1;i<=lenght;i++) {
            if (i % 2 == 1) {
                if (Character.compare(l1.get(0), l2.get(l2.size() - 1)) >= 0) {
                    ss.replace(end, end+1, l1.get(0).toString());
                    l1.remove(0);
                    end--;
                } else {
                    ss.replace(start,start+1,l1.get(0).toString());
                    l1.remove(l1.get(0));
                    start++;
                }
            } else {
                if (Character.compare(l2.get(l2.size()-1), l1.get(0)) <= 0) {
                    ss.replace(end, end+1, l2.get(l2.size()-1).toString());
                    l2.remove(l2.size()-1);
                    end--;
                } else {
                    ss.replace(start,start+1,l2.get(l2.size()-1).toString());
                    l2.remove(l2.size()-1);
                    start++;
                }
            }
        }
        out.println(ss);
        out.close();
    }
}