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 s1 = "";
  string s2 = "";
  string ts1, ts2;
  cin >> ts1 >> ts2;
  int n = ts1.size();
  sort(ts1.begin(), ts1.end());
  sort(ts2.rbegin(), ts2.rend());
  for (int i = 0; i < (n / 2) + (n % 2); ++i) {
    s1 += ts1[i];
  }
  for (int i = 0; i < (n / 2); ++i) {
    s2 += ts2[i];
  }
  string res = "";
  for (int i = 0; i < n; ++i) {
    res += '?';
  }
  assert(s1.size() + s2.size() == n);
  int i1 = 0;
  int j1 = s1.size() - 1;
  int i2 = 0;
  int j2 = s2.size() - 1;
  int c = 0;
  int k = 0;
  int l = n - 1;
  bool turn = 0;
  while (c < n) {
    if (turn == 0) {
      if (s1[i1] <= s2[i2]) {
        res[k] = s1[i1];
        ++i1;
        ++k;
      } else {
        res[l] = s1[j1];
        --j1;
        --l;
      }
    } else {
      if (s2[i2] <= s1[i1]) {
        res[l] = s2[j2];
        --j2;
        --l;
      } else {
        res[k] = s2[i2];
        ++i2;
        ++k;
      }
    }
    turn ^= 1;
    ++c;
  }
  cout << res << endl;
  return 0;
}
