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 a[300010], b[300010], ans[300010];
int n, l, r;
int main() {
  gets(a);
  gets(b);
  n = strlen(a);
  sort(a, a + n);
  sort(b, b + n);
  int la = 0, ra = n / 2;
  int lb = n - ra, rb = n - 1;
  if (n % 2 == 0) ra--;
  int cnt = 0;
  l = 0;
  r = n - 1;
  char tmp1, tmp2;
  while (cnt < n) {
    tmp1 = a[la];
    tmp2 = b[rb];
    if (tmp1 < tmp2) {
      ans[l++] = tmp1;
      la++;
    } else {
      ans[r--] = a[ra];
      ra--;
    }
    cnt++;
    if (cnt == n) break;
    tmp1 = a[la];
    if (tmp1 < tmp2) {
      ans[l++] = tmp2;
      rb--;
    } else {
      ans[r--] = b[lb];
      lb++;
    }
    cnt++;
  }
  ans[n] = '\0';
  puts(ans);
  return 0;
}
