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);
  string s1, s2;
  cin >> s1 >> s2;
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  reverse(s2.begin(), s2.end());
  int n = s1.size();
  if (n == 1) {
    cout << s1 << endl;
    return 0;
  }
  string s3(n, '?');
  int is1 = 0, es1 = (n + 1) / 2 - 1, is2 = 0, es2 = n / 2 - 1, is3 = 0,
      es3 = n - 1;
  for (int i = (0); i < (n); i++) {
    if (i % 2 == 0) {
      if (s1[es1] > s2[is2])
        s3[es3--] = s1[es1--];
      else
        s3[is3++] = s1[is1++];
    } else {
      if (s2[es2] < s1[is1])
        s3[es3--] = s2[es2--];
      else
        s3[is3++] = s2[is2++];
    }
  }
  cout << s3 << endl;
}
