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;
const long long INF = 1e18;
int mod = 1e9 + 7;
const int N = 1e5 + 10;
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int mul(int x, int y) {
  x = (1LL * x * y) % mod;
  return x;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string x, y;
  cin >> x >> y;
  set<pair<char, int> > xx, yy;
  int i = 0;
  for (auto ch : x) {
    xx.insert({ch, i});
    i++;
  }
  i = 0;
  for (auto ch : y) {
    yy.insert({ch, i});
    i++;
  }
  string ans = "", ans2 = "";
  int n = (int)x.size();
  int f = 0;
  int g = 0;
  int nn = n / 2;
  int nnn = n - nn;
  while (nn--) {
    auto it = xx.end();
    it--;
    xx.erase(it);
  }
  while (nnn--) {
    auto it = yy.begin();
    yy.erase(it);
  }
  for (int i = 0; i <= n - 1; ++i) {
    if ((int)xx.size() != 0 && (int)yy.size() != 0) {
      auto it1 = xx.begin();
      auto it2 = yy.end();
      it2--;
      if (it1->first > it2->first) {
        g = 1;
      }
    }
    if (g == 0) {
      if (f == 0) {
        auto it = xx.begin();
        xx.erase(it);
        ans += it->first;
      } else {
        auto it = yy.end();
        it--;
        yy.erase(it);
        ans += it->first;
      }
    } else {
      if (f == 0) {
        auto it = xx.end();
        it--;
        xx.erase(it);
        ans2 += it->first;
      } else {
        auto it = yy.begin();
        yy.erase(it);
        ans2 += it->first;
      }
    }
    f ^= 1;
  }
  cout << ans;
  for (int i = (int)ans2.size() - 1; i >= 0; --i) {
    cout << ans2[i];
  }
  return 0;
}
