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;
char aa[600000];
char bb[600000];
char cc[560000];
int main() {
  while (scanf("%s%s", aa, bb) != EOF) {
    int len = strlen(aa);
    sort(aa, aa + len);
    sort(bb, bb + len, greater<char>());
    int cnt = 0, cnt1 = len / 2 + (len & 1), snt = 0, snt1 = len / 2, flag = 1,
        l = 0, r = len - 1;
    cnt1--, snt1--;
    for (int i = 0; i < len; i++) {
      if (flag) {
        if (aa[cnt] < bb[snt])
          cc[l++] = aa[cnt++];
        else
          cc[r--] = aa[cnt1--];
      } else {
        if (aa[cnt] < bb[snt])
          cc[l++] = bb[snt++];
        else
          cc[r--] = bb[snt1--];
      }
      flag = !flag;
    }
    cc[len] = '\0';
    printf("%s\n", cc);
  }
}
