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() {
  string a, b, r = "";
  cin >> a >> b;
  int n = a.size();
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(a.begin(), a.end());
  bool ok = 0;
  deque<char> x, y;
  for (int i = 0; i < n; i++) x.emplace_back(a[i]), y.emplace_back(b[i]);
  stack<char> final;
  vector<char> v;
  while (n--) {
    if (!ok) {
      if (y.back() < x.back())
        final.push(x.front()), x.pop_front();
      else
        v.push_back(x.back()), x.pop_back();
    } else {
      if (x.back() > y.back())
        final.push(y.front()), y.pop_front();
      else
        v.push_back(y.back()), y.pop_back();
    }
    ok = !ok;
  }
  for (auto u : v) cout << u << "";
  while (!final.empty()) {
    cout << final.top() << "";
    final.pop();
  }
}
