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;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long n, i, l, x = 0;
  string a, b, c;
  multiset<char> m;
  multiset<char>::iterator it;
  cin >> a >> b;
  n = a.length();
  l = n - 1;
  for (i = 0; i < n; ++i) c.push_back('?');
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  if (n % 2 == 0) {
    for (i = 0; i < (n / 2); ++i) {
      m.insert(a[i]);
      while (1) {
        if (!m.empty()) {
          if (b[i] >= *m.begin()) {
            c[x++] = *m.begin();
            if (x == n) break;
            m.erase(m.begin());
          } else
            break;
        } else
          break;
      }
      if (x == n) break;
      c[x++] = b[i];
      if (x == n) break;
    }
    m.insert(a[i]);
    while (!m.empty() && x < n) {
      c[x++] = *m.begin();
      m.erase(m.begin());
    }
  } else {
    c[x++] = a[0];
    m.insert(b[0]);
    for (i = 1; i < ((n + 1) / 2); ++i) {
      while (1) {
        if (!m.empty()) {
          it = m.end();
          it--;
          if (a[i] <= *it) {
            c[x++] = *it;
            if (x == n) break;
            m.erase(it);
          } else
            break;
        } else
          break;
      }
      if (x == n) break;
      c[x++] = a[i];
      if (x == n) break;
      m.insert(b[i]);
    }
    m.insert(a[i]);
    while (!m.empty() && x < n) {
      it = m.end();
      it--;
      c[x++] = *it;
      m.erase(it);
    }
  }
  cout << c << endl;
  return 0;
}
