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.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
import java.io.IOException;

public class JavaApplication13  {      
static char[] ans;
static String O;
static String I;
static char[] Ochar;
static char[] Ichar;
static int n;
static boolean otomove;
static int front;
static int back;
static int Ofront;
static int Oback;
static int Ifront;
static int Iback;

public static void runweird(int i)
{       Oback = Ofront+(n-i)/2-1;
       Ifront = Iback-(n-i)/2+1;
       //System.out.println(Oback+" "+Ifront);
              if((n-i)%2==1)
       {
           if (n%2==0) Ifront--;
           else Oback++;
       }
              
       for(int j = i;j<n;j++){

       if(otomove)
       {
           ans[back]=Ochar[Oback];
           back--;
           Oback--;
           
       }
       else
       {
           ans[back]=Ichar[Ifront];
           back--;
           Ifront++;
           
       }
       otomove=!otomove;
       }
}


public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter pw = new PrintWriter(System.out);
    //StringTokenizer st = new StringTokenizer(br.readLine());
    O = br.readLine();
    I = br.readLine();
    n = O.length();
    Ochar = new char[n];
    Ichar = new char[n];
    ans = new char[n];
    
    for(int i = 0;i<n;i++)
    {
        Ochar[i]=O.charAt(i);
        Ichar[i]=I.charAt(i);
    }
    Arrays.sort(Ochar);
    Arrays.sort(Ichar);
    
    //for(int i = 0;i<n;i++){System.out.print(Ochar[i]);}
    //System.out.println();
    //for(int i = 0;i<n;i++){System.out.print(Ichar[i]);}
    //System.out.println();
        
    boolean weird = (Ichar[n-1]<=Ochar[0]);
    front = 0;
    back = n-1;
    Ofront = 0;
    //int Oback = n-1;
    //int Ifront = 0;
    Iback = n-1;    
    otomove = true;
    for(int i =0;i<n;i++)
    {
       if(!weird)
       {if(otomove)
       {ans[front]=Ochar[Ofront];
        front++;
        Ofront++;
        
       }
       else{
       ans[front]=Ichar[Iback];
       front++;
       Iback--;
       
       }
       otomove=!otomove;
       if(Iback>=0&&Ofront<n)
       weird = (Ichar[Iback]<=Ochar[Ofront]);
       }
       else
       {
//System.out.println("weird"+" "+ i+ Ochar[Ofront] +" "+Ichar[Iback]);
       runweird(i);break;}
       
    }
    
    for(int i =0;i<n;i++)
    {
        pw.print(ans[i]);
    }
    pw.close();
    }
       
}