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 pair<int, int> DD[] = {{1, 0},  {1, 1},   {0, 1},  {-1, 1},
                             {-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
template <class T>
T smin(T &a, T b) {
  if (a > b) a = b;
  return a;
}
template <class T>
T smax(T &a, T b) {
  if (a < b) a = b;
  return a;
}
int main(void) {
  srand(time(0));
  cout << fixed << setprecision(7);
  cerr << fixed << setprecision(7);
  string a, b;
  cin >> a >> b;
  multiset<char> xx;
  multiset<char, greater<char> > yy;
  for (auto it : a) xx.insert(it);
  for (auto it : b) yy.insert(it);
  int n = a.size();
  static char ans[1 << 20];
  int l = 1, r = n;
  for (int cs = 1; cs <= n; ++cs) {
    if (cs & 1) {
      if (*yy.begin() <= *xx.begin())
        ans[r] = *xx.begin(), --r, xx.erase(xx.begin());
      else
        ans[l] = *xx.begin(), ++l, xx.erase(xx.begin());
    } else {
      if (*xx.begin() >= *yy.begin())
        ans[r] = *yy.begin(), --r, yy.erase(yy.begin());
      else
        ans[l] = *yy.begin(), ++l, yy.erase(yy.begin());
    }
  }
  for (int i = 1; i <= n; ++i) cout << ans[i];
  cout << '\n';
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
