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;
string ol, ig;
deque<char> a, z;
int main() {
  cin >> ol >> ig;
  int n = ol.size();
  sort(ol.begin(), ol.end());
  sort(ig.begin(), ig.end(), greater<char>());
  for (int i = 0; i < (n / 2 + n % 2); i++) a.push_back(ol[i]);
  for (int i = 0; i < n / 2; i++) z.push_back(ig[i]);
  string res(n, 0);
  int i = 0, j = n - 1;
  bool f = true;
  while (a.size() || z.size()) {
    if (f) {
      if (z.size() && a.front() >= z.front()) {
        res[j--] = a.back();
        a.pop_back();
      } else {
        res[i++] = a.front();
        a.pop_front();
      }
    } else {
      if (a.size() && z.front() <= a.front()) {
        res[j--] = z.back();
        z.pop_back();
      } else {
        res[i++] = z.front();
        z.pop_front();
      }
    }
    f = !f;
  }
  cout << res << '\n';
  return 0;
}
