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

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
using namespace std;
multiset<char> oleg, igor;
int main(int argc, char* argv[]) {
  int i, j, k, m, n, p, q, r, t;
  string a, b, res;
  cin >> a;
  cin >> b;
  res = a;
  n = a.size();
  for (i = 0; i < n; ++i) {
    oleg.insert(a[i]);
  }
  for (i = 0; i < n; ++i) {
    igor.insert(b[i]);
  }
  for (i = 0; i < n / 2; ++i) oleg.erase(--oleg.end());
  for (i = 0; i < (n + 1) / 2; ++i) igor.erase(igor.begin());
  int turn = 0;
  for (i = 0; i < n;) {
    char c1, c2;
    c1 = *(oleg.begin());
    if (igor.size()) c2 = *(igor.rbegin());
    if (c1 < c2) {
      if (turn) {
        res[i] = c2;
        igor.erase(--igor.end());
      } else {
        res[i] = c1;
        oleg.erase(oleg.begin());
      }
      i++;
    } else {
      if (turn) {
        res[--n] = *igor.begin();
        igor.erase(igor.begin());
      } else {
        res[--n] = *oleg.rbegin();
        oleg.erase(--oleg.end());
      }
    }
    turn = !turn;
  }
  cout << res << endl;
  return 0;
}
