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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
    public static void main(String[] args) throws Exception {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        String s = bf.readLine();
        String t = bf.readLine();
        int n = s.length();
        Map<Integer, Integer> count1 = new HashMap<Integer, Integer>();
        TreeSet<Integer> count1set = new TreeSet<Integer>();
        Map<Integer, Integer> count2 = new HashMap<Integer, Integer>();
        TreeSet<Integer> count2set = new TreeSet<Integer>();
        for(int i=0; i<n; i++) {
          if(!count1.containsKey(s.charAt(i)-'a')) count1.put(s.charAt(i)-'a', 0);
          count1.put(s.charAt(i)-'a', count1.get(s.charAt(i)-'a')+1);
          count1set.add(s.charAt(i)-'a');

          if(!count2.containsKey(t.charAt(i)-'a')) count2.put(t.charAt(i)-'a', 0);
          count2.put(t.charAt(i)-'a', count2.get(t.charAt(i)-'a')+1);
          count2set.add(t.charAt(i)-'a');
        }

        int[] ans = new int[n];
        int head = 0;
        int tail = n-1;
        boolean turn = true;
        while(head <= tail) {
          if(turn) {
            if(count1set.first() < count2set.last()) {
              ans[head] = count1set.first();

              count1.put(ans[head], count1.get(ans[head])-1);
              if(count1.get(ans[head]) == 0) count1set.remove(ans[head]);
              head++;
            }
            else {
              ans[tail] = count1set.last();

              count1.put(ans[tail], count1.get(ans[tail])-1);
              if(count1.get(ans[tail]) == 0) count1set.remove(ans[tail]);
              tail--;
            }
            turn = !turn;
          }
          else {
            if(count2set.last() > count1set.first()) {
              ans[head] = count2set.last();

              count2.put(ans[head], count2.get(ans[head])-1);
              if(count2.get(ans[head]) == 0) count2set.remove(ans[head]);
              head++;
            }
            else {
              ans[tail] = count2set.first();

              count2.put(ans[tail], count2.get(ans[tail])-1);
              if(count2.get(ans[tail]) == 0) count2set.remove(ans[tail]);
              tail--;
            }
            turn = !turn;
          }
        }
        char[] aans = new char[n];
        for(int i=0; i<n; i++) aans[i] = (char)(ans[i]+'a');
        out.println((new String(aans)));
        // int n = Integer.parseInt(bf.readLine());
        // StringTokenizer st = new StringTokenizer(bf.readLine());
        // int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());
        // int n = Integer.parseInt(st.nextToken());

        out.close(); System.exit(0);
    }
}
