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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.List;
 import java.util.*;
public  class realfast implements Runnable 
  {
    private static final int INF = (int) 1e9;
    long in= 1000000007;
    long fac[]= new long[1000001];
    long inv[]=new long[1000001];
    public  void solve() throws IOException 
    {

        //int t = readInt();
        String a = readString();
        String b = readString();

        int arr[]=new int[a.length()];

        int map[]=new int[26];
        int map1[]=new int[26];
        for(int i =0;i<a.length();i++)
        {
             int c = (int)a.charAt(i);
             c=c-97;
             map[c]++;
        }
        int rem =a.length()-(a.length()+1)/2;
        int rem1 = (a.length()+1)/2;
        for(int i=25;i>=0;i--)
        {
            while(rem>0&&map[i]>0)
            {
                  map[i]--;
                  rem--;
            }
        }
        

        for(int i =0;i<b.length();i++)
        {
             int c = (int)b.charAt(i);
             c=c-97;
             map1[c]++;
        }
        for(int i = 0;i<=25;i++)
        {
            while(rem1>0&&map1[i]>0)
            {
                  map1[i]--;
                  rem1--;
            }

        }

        int left =0;
        int right=a.length()-1;
        boolean check = true;
        while(left<=right)
        {
            int less =25;
            int more = 0;
            int less1=25;
            int more1= 0;
            for(int i =0;i<26;i++)
            {
                if(map[i]>0)
                {
                 //   map[i]--;
                    less=i;
                    break;
                }

            }
            for(int i= 25;i>=0;i--)
            {
                if(map[i]>0)
                {
                  //  map1[i]--;
                    more=i;
                    break;
                }

            }
            for(int i =0;i<26;i++)
            {
                if(map1[i]>0)
                {
                 //   map[i]--;
                    less1=i;
                    break;
                }

            }
            for(int i= 25;i>=0;i--)
            {
                if(map1[i]>0)
                {
                  //  map1[i]--;
                    more1=i;
                    break;
                }

            }
            if(check)
            {
                if(less<=more1)
                {
                    arr[left]= less;
                     left++;
                     map[less]--;
                }
                else
                {
                    arr[right]= more;
                    right--; 
                    map[more]--;
                }
                //arr[less]--;
            }
            else
            {
                 if(more1>=less)
                 {
                    arr[left]= more1;
                    left++;
                    map1[more1]--;
                 }
                 else
                 {
                     arr[right]= less1;
                     right--;
                     map1[less1]--;
                 }
            }
            if(check)
            {
                check=false;
            }
            else
                check = true;

        }

        for(int i=0;i<arr.length;i++)
        {
            out.print((char)(arr[i]+97));
        }

        out.println();


       

    }
    
    public int value (int seg[], int left , int right ,int index, int l, int r)
    {
            
            if(left>right)
            {
              return -100000000;
            }
            if(right<l||left>r)
                return -100000000;
            if(left>=l&&right<=r)
                return seg[index];
            int mid = left+(right-left)/2;
            int val = value(seg,left,mid,2*index+1,l,r);
            int val2 = value(seg,mid+1,right,2*index+2,l,r);
            return Math.max(val,val2);

    }
   
    public int gcd(int a , int b )
    {
      if(a<b)
      {
        int t =a;
        a=b;
        b=t;
      }
      if(a%b==0)
        return b ;
      return gcd(b,a%b);
    }
    public long pow(long n , long p,long m)
    {
         if(p==0)
            return 1;
        long val = pow(n,p/2,m);;
        val= (val*val)%m;
        if(p%2==0)
            return val;
        else
            return (val*n)%m;
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }
 
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;
 
    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }
 
    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
 
    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
 
    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }
 
    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    int u ;
    int v;
    
    edge(int u, int v)
    {
       this.u=u;
       this.v=v;
    }
    public int compareTo(edge e)
    {
        return this.v-e.v;
    }
}
 		 	  	  		  		  		 	  				 		