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

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Yousuf
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    TaskC solver = new TaskC();
    solver.solve(1, in, out);
    out.close();
  }

  static class TaskC {
    int length;

    public int[] getWord(InputReader in) {
      String str = in.next();
      length = str.length();

      int res[] = new int[26];
      for (int i = 0; i < str.length(); i++) {
        ++res[str.charAt(i) - 'a'];
      }

      return res;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {

      int a[] = getWord(in);
      int b[] = getWord(in);

      char res[] = new char[length];

      int left = 0;
      int right = length - 1;

      for (int i = 0; i < length; ++i) {
        if (i % 2 == 0) {
          // 1st player
          int min = 0, max = b.length - 1;

          while (a[min] == 0) ++min;
          while (b[max] == 0) --max;

          if (min < max) {
            res[left++] = (char) ('a' + min);
            --a[min];
          } else {

            int minMax = (length - i - 1) / 2;
            while (a[min] <= minMax) {
              minMax -= a[min];
              ++min;
            }
            res[right--] = (char) ('a' + min);
            --a[min];
          }
        } else {
          // 2nd player

          int min = 0, max = b.length - 1;

          while (a[min] == 0) ++min;
          while (b[max] == 0) --max;

          if (min < max) {
            res[left++] = (char) ('a' + max);
            --b[max];
          } else {

            int minMax = (length - i - 1) / 2;
            while (b[max] <= minMax) {
              minMax -= b[max];
              --max;
            }

            res[right--] = (char) ('a' + max);
            --b[max];
          }
        }
      }

      out.print(res);
    }
  }

  static class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream), 32768);
      //  reader = new BufferedReader(new FileReader("input.txt"));
      tokenizer = null;
    }

    public String next() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          tokenizer = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.nextToken();
    }
  }
}

