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(false);
  cin.tie(0);
  int n;
  string s;
  multiset<char> m1, m2;
  multiset<char>::iterator it1, it2;
  while (cin >> s) {
    n = s.size();
    m1.clear();
    for (int i = 0; i < n; i++) m1.insert(s[i]);
    cin >> s;
    m2.clear();
    for (int i = 0; i < n; i++) m2.insert(s[i]);
    for (int i = 0; i < n; i++) s[i] = '?';
    int l = 0, r = n - 1;
    for (int i = 0; i < n; i++) {
      it1 = m1.begin();
      it2 = m2.end();
      it2--;
      char mini = *m1.begin();
      char maxi = *it2;
      if (s[l] == '?') s[l++] = mini;
      m1.erase(it1);
      if (s[l] == '?') s[l++] = maxi;
      m2.erase(it2);
    }
    cout << s << '\n';
  }
  return 0;
}
