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, b;
  cin >> a >> b;
  vector<int> oc(26), occ(26);
  for (char& x : a) oc[(int)(x - 'a')]++;
  for (char& x : b) occ[(int)(x - 'a')]++;
  int p1 = 0, p2 = 25;
  string ans;
  int t = 0;
  int n = a.size();
  while (n--) {
    if (t) {
      while (occ[p2] == 0) p2--;
      occ[p2]--;
      ans += (p2 + 'a');
    } else {
      while (oc[p1] == 0) p1++;
      oc[p1]--;
      ans += (p1 + 'a');
    }
    t ^= 1;
  }
  cout << ans;
  return 0;
}
