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, p1, p2, p, pp1, pp2, cnt, f;
char a[300010], b[300010], ans[300010];
bool cmp1(char a, char b) { return a < b; }
bool cmp2(char a, char b) { return a > b; }
int main() {
  cin >> a + 1 >> b + 1;
  n = strlen(a + 1);
  sort(a + 1, a + n + 1, cmp1);
  sort(b + 1, b + n + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    if (a[p1 + 1] >= b[p2 + 1]) {
      p = i, f = i & 1;
      break;
    }
    if (i & 1) {
      ans[i] = a[++p1];
    } else
      ans[i] = b[++p2];
  }
  if (p) {
    pp1 = (n + 1 >> 1) + 1;
    pp2 = (n >> 1) + 1;
    for (int i = n; i >= p; i--, f = 1 - f)
      if (f)
        ans[i] = a[--pp1];
      else
        ans[i] = b[--pp2];
  }
  cout << ans + 1;
  return 0;
}
