#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
long long int POWER[65];
long long int aonb(long long int a, long long int b) {
  long long int ret = 1;
  while (b) {
    if (b & 1) ret *= a;
    a *= a;
    if (ret >= MOD) ret %= MOD;
    if (a >= MOD) a %= MOD;
    b >>= 1;
  }
  return ret;
}
void precompute() {
  POWER[0] = 1;
  for (int i = 1; i < 63; i++) POWER[i] = POWER[i - 1] << 1LL;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cout << std::setprecision(10) << std::fixed;
  string A, B;
  cin >> A >> B;
  sort(A.begin(), A.end());
  sort(B.rbegin(), B.rend());
  deque<char> P, Q;
  int n = A.size();
  for (int i = 0; i < (n + 1) / 2; i++) {
    P.push_back(A[i]);
  }
  for (int i = 0; i < n / 2; i++) {
    Q.push_back(B[i]);
  }
  string ansl = "", ansr = "";
  bool curr = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      if (!Q.empty() && P.front() >= Q.front()) {
        curr = 1;
      }
      if (curr) {
        ansr += Q.back();
        Q.pop_back();
      } else {
        ansl += Q.front();
        Q.pop_front();
      }
    } else {
      if (!P.empty() && P.front() >= Q.front()) {
        curr = 1;
      }
      if (curr) {
        ansr += P.back();
        P.pop_back();
      } else {
        ansl += P.front();
        P.pop_front();
      }
    }
  }
  reverse(ansr.begin(), ansr.end());
  cout << ansl << ansr;
  return 0;
}
