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;
vector<char> O, I;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  O = vector<char>(a.begin(), a.end());
  I = vector<char>(b.begin(), b.end());
  sort(O.begin(), O.end());
  sort(I.begin(), I.end());
  reverse(I.begin(), I.end());
  int n = O.size();
  vector<char> sol(n, 0);
  int i, j, k;
  for (i = 0, j = 0, k = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (O[j] >= I[k]) {
        break;
      }
      sol[i] = O[j++];
    } else {
      sol[i] = I[k++];
    }
  }
  if (n % 2 == 0) {
    for (; i < n; i++) {
      if (i % 2 == 0) {
        sol[i] = O[j++];
      } else {
        sol[i] = I[k++];
      }
    }
  } else {
    for (; i < n; i++) {
      if (i % 2 == 0) {
        sol[i] = I[j++];
      } else {
        sol[i] = O[k++];
      }
    }
  }
  std::string ans(sol.begin(), sol.end());
  cout << ans << '\n';
}
