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 + 10;
int N;
char a[MAXN], b[MAXN];
int fa[MAXN], fb[MAXN];
char ans[MAXN];
int main() {
  scanf("%s%s", a, b);
  N = strlen(a);
  for (int i = 0; i < N; i++) {
    fa[a[i] - 'a']++;
    fb[b[i] - 'a']++;
  }
  for (int i = 0, p = 25; i < N - (N + 1) / 2; i++) {
    while (fa[p] == 0) {
      p--;
    }
    fa[p]--;
  }
  for (int i = 0, p = 0; i < N - N / 2; i++) {
    while (fb[p] == 0) {
      p++;
    }
    fb[p]--;
  }
  for (int n = 0, s1 = 0, s2 = N - 1, i1 = 0, i2 = 25, j1 = 0, j2 = 25; n < N;
       n++) {
    while (fa[i1] == 0) {
      i1++;
    }
    while (fa[i2] == 0) {
      i2--;
    }
    while (fb[j1] == 0) {
      j1++;
    }
    while (fb[j2] == 0) {
      j2--;
    }
    if (n % 2 == 0) {
      if (j2 > i1) {
        ans[s1++] = 'a' + i1;
        fa[i1]--;
      } else {
        ans[s2--] = 'a' + i2;
        fa[i2]--;
      }
    } else {
      if (i1 < j2) {
        ans[s1++] = 'a' + j2;
        fb[j2]--;
      } else {
        ans[s2--] = 'a' + j1;
        fb[j1]--;
      }
    }
  }
  printf("%s\n", ans);
}
