bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
char s1[300033] = {0}, s2[300033] = {0}, out[300033] = {0};
int compare1(const void *a, const void *b) { return (*(char *)a - *(char *)b); }
int compare2(const void *a, const void *b) { return (*(char *)b - *(char *)a); }
int main() {
  int i, j, l, status = 0;
  scanf("%s", s1);
  scanf("%s", s2);
  l = strlen(s1);
  qsort(s1, l, sizeof(char), compare1);
  qsort(s2, l, sizeof(char), compare2);
  for (i = 0; i < l; i++) {
    if (s1[i / 2] >= s2[i / 2]) {
      status = 1;
      break;
    }
    if (i % 2 == 0)
      out[i] = s1[i / 2];
    else
      out[i] = s2[i / 2];
  }
  if (status == 1) {
    int m1, m2;
    m1 = m2 = l / 2;
    if (l % 2 == 1) m1 += 1;
    for (j = 0; j < l - i; j++) {
      if ((i + j) % 2 == 0)
        out[l - 1 - j] = s1[m1 - 1 - j / 2];
      else
        out[l - 1 - j] = s2[m2 - 1 - j / 2];
    }
  }
  printf("%s\n", out);
  return 0;
}
