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);
  long long i, j, k, l, c, v, n, m, d, e, f, r, t;
  string s, s1, s2;
  {
    cin >> s >> s1;
    l = s.size();
    sort(s.begin(), s.end());
    sort(s1.begin(), s1.end());
    if (s1[l - 1] < s[0]) {
      for (i = l - 1, j = 0, k = 0; j < l;) {
        if (j % 2 == 0) {
          s2 += s1[i];
          i--;
        } else {
          s2 += s[k];
          k++;
        }
        j++;
      }
      cout << s2 << endl;
      s2 = "";
    } else {
      for (i = l - 1, j = 0, k = 0; j < l;) {
        if (j % 2 == 1) {
          s2 += s1[i];
          i--;
        } else {
          s2 += s[k];
          k++;
        }
        j++;
      }
      cout << s2 << endl;
      s2 = "";
    }
  }
}
