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 N = 3e5 + 10;
char a[N], b[N], ans[N];
int n;
bool cmp(const char a, const char b) { return a > b; }
int main() {
  scanf("%s%s", a, b);
  n = strlen(a);
  sort(a, a + n);
  sort(b, b + n, cmp);
  int aend = (n % 2 == 0) ? (n / 2) : (n / 2 + 1), bend = n / 2;
  int anode = 0, bnode = 0;
  for (int head = 0, tail = n - 1; head <= tail;) {
    if (a[anode] < b[bnode])
      ans[head++] = a[anode++];
    else
      ans[tail--] = a[aend--];
    if (head > tail) break;
    if (b[bnode] > b[bnode])
      ans[head++] = b[bnode++];
    else
      ans[tail--] = b[bend--];
  }
  for (int i = 0; i < n; i++) putchar(ans[i]);
  printf("\n");
}
