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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  string s, t;
  cin >> s >> t;
  int n = s.size();
  sort(s.begin(), s.end());
  sort(t.begin(), t.end());
  int oleg_l = 0, oleg_r = n - 1, igor_l = 0, igor_r = n - 1;
  int l = 0, r = n - 1;
  bool o_turn = true;
  vector<char> ans(n, '?');
  while (l < n && s[oleg_l] <= t[igor_r]) {
    if (o_turn) {
      ans[l++] = s[oleg_l++];
    } else {
      ans[l++] = t[igor_r--];
    }
    o_turn = !o_turn;
  }
  int chars_rem = n - l;
  if (chars_rem % 2 == 0 && !o_turn) {
    o_turn = !o_turn;
  }
  while (l < n) {
    if (o_turn) {
      ans[l++] = s[oleg_l++];
    } else {
      ans[l++] = t[igor_r--];
    }
    o_turn = !o_turn;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i];
  }
  return 0;
}
