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;
const int maxn = 3e5 + 5;
char a[maxn], b[maxn];
char s[maxn >> 1], t[maxn >> 1];
int main() {
  scanf("%s", a);
  scanf("%s", b);
  int sz = strlen(a);
  sort(a, a + sz);
  sort(b, b + sz);
  int la = 0, ra = sz % 2 ? sz / 2 : sz / 2 - 1;
  int lb = sz - sz / 2, rb = sz - 1;
  int ps = 0, pt = 0;
  for (int i = 0; i < sz; i++) {
    if (i % 2 == 0) {
      if (a[la] < b[rb])
        s[ps++] = a[la++];
      else
        t[pt++] = a[ra--];
    } else {
      if (b[rb] <= a[la])
        t[pt++] = b[lb++];
      else
        s[ps++] = b[rb--];
    }
  }
  s[ps] = '\0';
  reverse(t, t + pt);
  t[pt] = '\0';
  printf("%s%s\n", s, t);
  return 0;
}
