bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
char s[2][1 << 19], *t[2];
int n, i;
int main() {
  do std::sort(s[i], s[i] + (n = strlen(gets(t[i] = s[i]))));
  while (++i < 2);
  std::reverse(s[1], s[1] + n);
  int p[] = {1, n & 1};
  while (n--) putchar(*t[p[*t[0] >= *t[1]] ^= 1]++);
  putchar('\n');
}
