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 Problems1 {

    public static void main(String[] args) throws IOException {
        FastScanner sc=new FastScanner(System.in);
        StringBuilder s=new StringBuilder();
        StringBuilder sr=new StringBuilder();
        
        int set1[]=new int[26];
        int set2[]=new int[26];
        String s1=sc.next();
        String s2=sc.next();
        int n=s1.length();
        char c;
        for(int i=0;i<n;i++){
            c=s1.charAt(i);
            set1[c-97]++;
        }
        for(int i=0;i<n;i++){
            c=s2.charAt(i);
            set2[c-97]++;
        }
        int c1=0,c2=25;
        for(int i=0;i<n;i++){
            while(set1[c1]==0){
                c1++;
            }
            
            if(c1>c2)sr.append((char)(c1+97));
            else s.append((char)(c1+97));
            set1[c1]--;
            
            i++;
            if(i>=n)break;
            
            while(set2[c2]==0){
                c2--;
            }
            if(c2<c1)sr.append((char)(c2+97));
            else s.append((char)(c2+97));
            set2[c2]--;
        }
        for(int i=sr.length()-1;i>=0;i--){
            s.append(sr.charAt(i));
        }
        System.out.println(s.toString());
        
    }
     public static void dis(int a[]){
        StringBuilder s=new StringBuilder();
        for(int i=0;i<a.length;i++){
            s.append(a[i]+" ");
        }
        System.out.println(s.toString());
    }
    //__________________________________________________________
    static class FastScanner {
	    BufferedReader br;
	    StringTokenizer st;
		
	    public FastScanner(InputStream i) {
	        br = new BufferedReader(new InputStreamReader(i));
	        st = new StringTokenizer("");
	    }
				
	    public String next() throws IOException {
	        if(st.hasMoreTokens())
	            return st.nextToken();
	        else
	            st = new StringTokenizer(br.readLine());
	        return next();
	    }

	    public int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }
	    //#
	    public long nextLong() throws IOException {
	        return Long.parseLong(next());
	    }
	    public double nextDouble() throws IOException {
	        return Double.parseDouble(next());
	    }
	    //$
	}
}
