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;
int n;
string a, b;
int l, r, i1, i2, i3, i4;
string tmp;
int main() {
  cin >> a >> b;
  tmp = a;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  n = a.size();
  l = 0;
  r = n - 1;
  i1 = i2 = 0;
  i3 = n / 2;
  i4 = n / 2;
  if (n % 2 == 0)
    i3--, i4--;
  else
    i4--;
  for (int i = 1; i <= n; i++) {
    if (i % 2) {
      if (a[i1] >= b[i2]) {
        tmp[r] = a[i3];
        i3--;
        r--;
      } else {
        tmp[l] = a[i1];
        l++;
        i1++;
      }
    } else {
      if (b[i2] <= a[i1]) {
        tmp[r] = b[i4];
        i4--;
        r--;
      } else {
        tmp[l] = b[i2];
        l++;
        i2++;
      }
    }
  }
  cout << tmp;
}
