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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.*;
import java.util.*;
public class Main {

	public static void main(String[] args) {
		FastScanner sc=new FastScanner();
		PrintWriter pw=new PrintWriter(System.out);
		while(sc.hasNext()){
			String s1=sc.next();
			String s2=sc.next();
			char[] res=new char[s1.length()];
			HashMap<Character,Integer>map1=new HashMap<Character,Integer>();
			HashMap<Character,Integer>map2=new HashMap<Character,Integer>();
			for(int i=0;i<s1.length();i++){
				char t=s1.charAt(i);
				if(!map1.containsKey(t)){
					map1.put(t, 1);
				}else{
					map1.put(t, map1.get(t)+1);
				}
			}
			for(int i=0;i<s2.length();i++){
				char t=s2.charAt(i);
				if(!map2.containsKey(t)){
					map2.put(t, 1);
				}else{
					map2.put(t, map2.get(t)+1);
				}
			}
			PriorityQueue<Letter1>q1=new PriorityQueue<Letter1>();
			PriorityQueue<Letter2>q2=new PriorityQueue<Letter2>();
			for(char c:map1.keySet()){
				q1.add(new Letter1(c,map1.get(c)));
			}
			for(char c:map2.keySet()){
				q2.add(new Letter2(c,map2.get(c)));
			}
			int count=0;
			int start=0;
			int end=s1.length()-1;
			while(count<s1.length()){
				count++;
				if(count%2!=0){
					Letter1 l=q1.poll();
					if(l.num>1){
						q1.add(new Letter1(l.c,l.num-1));
					}
					if(l.c>=q2.peek().c){
						res[end--]=l.c;
					}else{
						res[start++]=l.c;
					}
				}else{
					Letter2 l=q2.poll();
					if(l.num>1){
						q2.add(new Letter2(l.c,l.num-1));
					}
					if(l.c<=q1.peek().c){
						res[end--]=l.c;
					}else{
						res[start++]=l.c;
					}
				}
				}
			for(int i=0;i<s1.length();i++) pw.print(res[i]);
			pw.flush();
		}

	}

}
class Letter1 implements Comparable<Letter1>{
	char c;
	int num;
	Letter1(char c,int n){
		this.c=c;
		num=n;
	}
	public int compareTo(Letter1 l) {
		if(this.c<l.c)return -1;
		if(this.c>l.c)return 1;
		return 0;
	}
}
class Letter2 implements Comparable<Letter2>{
	char c;
	int num;
	Letter2(char c,int n){
		this.c=c;
		num=n;
	}
	public int compareTo(Letter2 l) {
		if(this.c>l.c)return -1;
		if(this.c<l.c)return 1;
		return 0;
	}
}
class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer("");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public boolean hasNext() {
		while (!st.hasMoreTokens()) {
			String line = nextLine();
			if (line == null) {
				return false;
			}
			st = new StringTokenizer(line);
		}
		return true;
	}

	public String next() {
		if (st.hasMoreTokens())
			return st.nextToken();
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
			e.printStackTrace();
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public String nextLine() {
		String line = "";
		try {
			line = br.readLine();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return line;
	}
}