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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class NamingCompany 
{

	
	public static void main(String[]args)throws Throwable
	{
		Scanner sc = new Scanner(System.in);
		int me[] = new int[26];
		int[] him = new int[26];
		String a = sc.next(), b = sc.next();
		for(int i = 0 ; i < a.length(); ++i)
			me[a.charAt(i) - 'a']++;
		for(int j = 0 ; j < b.length(); ++j)
			him[b.charAt(j) - 'a']++;
		int turn = 0;
		char f[] = a.toCharArray(), s[] = b.toCharArray();
		Arrays.sort(f); Arrays.sort(s);
		char res[] = new char[a.length()];
		int l = 0, r = a.length() - 1;
		while(l <= r)
		{
			if(turn == 0)
			{
				int least = -1;
				for(int i = 0 ; i < 26 ; ++i)
				{
					if(me[i] > 0)
					{
						least = i;
						break;
					}
				}
				me[least]--;
				boolean allless = true;
				for(int i = 0 ; i < 26 ; ++i)
				{
					if(him[i] > 0)
						allless &= least >= i;
				}
				if(allless)
					res[r--] = 'A';
				else res[l++] = 'A';
					
			}
			else
			{
				int biggest = -1;
				for(int j = 25 ; j >= 0 ;--j)
				{
					if(him[j] > 0)
					{
						biggest = j;
						break;
					}
				}
				him[biggest]--;
				boolean allbigger = true;
				for(int i = 0 ; i < 26 ; ++i)
				{
					if(me[i] > 0)
						allbigger &= biggest <= i;
				}
				if(allbigger)
					res[r--] = 'B';
				else res[l++] = 'B';
			}
			
			turn ^= 1;
		}
		PrintWriter out = new PrintWriter(System.out);
		int p = 0;
		int q = b.length() - 1;
		for(int i = 0 ; i < a.length() ; ++i)
		{
			if(res[i] == 'A')
				out.print(f[p++]);
			else out.print(s[q--]);
		}
		out.flush();
		out.close();
		
	}
	
	static class Scanner
	{
		BufferedReader br;
		StringTokenizer st;


		Scanner(InputStream s)  { br = new BufferedReader(new InputStreamReader(s)); }
		public Scanner(String s) throws FileNotFoundException{	br = new BufferedReader(new FileReader(s));}


		String next() throws IOException
		{

			while(st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();

		}
		int nextInt() throws NumberFormatException, IOException { return Integer.parseInt(next()); }
		long nextLong() throws NumberFormatException, IOException { return Long.parseLong(next()); }



	}
}
