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() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, s1;
  cin >> s;
  cin >> s1;
  vector<char> ar;
  vector<char> ar1;
  vector<char> ans;
  long long n = s.length();
  ans.resize(n);
  for (long long i = 0; i < n; ++i) {
    ar.push_back(s[i]);
    ar1.push_back(s1[i]);
  }
  sort(ar.begin(), ar.end());
  sort(ar1.rbegin(), ar1.rend());
  long long i = 0;
  long long j = 0;
  long long l = 0;
  long long r = n - 1;
  for (;;) {
    if (ar[i] > ar1[j]) {
      ans[r] = ar[i];
      --r;
    } else if (ar[i] == ar1[j]) {
      if (ar[i] > ar1[n / 2]) {
        ans[r] = ar[i];
        --r;
      } else {
        ans[l] = ar[i];
        ++l;
      }
    } else {
      ans[l] = ar[i];
      ++l;
    }
    ++i;
    if (r < l) break;
    if (ar[i] > ar1[j]) {
      ans[r] = ar1[j];
      --r;
    } else if (ar1[j] == ar[i]) {
      if (ar1[j] < ar[(n + 1) / 2]) {
        ans[r] = ar1[j];
        --r;
      } else {
        ans[l] = ar1[j];
        ++l;
      }
    } else {
      ans[l] = ar1[j];
      ++l;
    }
    ++j;
    if (r < l) break;
  }
  for (long long i = 0; i < s.length(); ++i) {
    cout << ans[i];
  }
}
