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 A;
  string B;
  cin >> A >> B;
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  int Alo = 0, Ahi = (A.size() + 1) / 2;
  int Blo = B.size() - B.size() / 2, Bhi = B.size();
  string ans;
  while (ans.size() < A.size()) {
    if (A[Alo] >= B[Bhi - 1]) {
      while (Bhi > Blo) {
        ans.push_back(B[--Bhi]);
      }
      while (Alo < Ahi) {
        ans.push_back(A[Alo++]);
      }
    } else {
      ans.push_back(A[Alo++]);
      if (ans.size() >= A.size()) break;
      ans.push_back(B[--Bhi]);
    }
  }
  cout << ans;
}
