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 = 300005;
bool cmpa(char x, char y) { return x < y; }
bool cmpb(char x, char y) { return x > y; }
int main() {
  char a[N], b[N], c[N];
  int n = 0, pos;
  char ch;
  bool FLAG = 0;
  while (~scanf("%c", &ch)) {
    if (ch != '\n')
      a[n++] = ch;
    else {
      n = 0;
      break;
    }
  }
  while (~scanf("%c", &ch)) {
    if (ch != '\n')
      b[n++] = ch;
    else
      break;
  }
  sort(a, a + n, cmpa);
  sort(b, b + n, cmpb);
  bool flag = 1;
  int ai = 0, bi = 0, ci = 0;
  while (1) {
    if (flag) {
      if (a[ai] < b[bi]) {
        c[ci++] = a[ai++];
        if (ci == n) break;
      } else {
        pos = ci;
        FLAG = 1;
        break;
      }
      flag = 0;
    } else {
      if (a[ai] < b[bi]) {
        c[ci++] = b[bi++];
        if (ci == n) break;
      } else {
        pos = ci;
        FLAG = 1;
        break;
      }
      flag = 1;
    }
  }
  if (FLAG) {
    ci = n - 1;
    ai = n / 2 - 1 + (n % 2 == 1);
    bi = n / 2 - 1;
    while (1) {
      if (flag) {
        c[ci--] = a[ai--];
        if (ci == pos - 1) break;
        flag = 0;
      } else {
        c[ci--] = b[bi--];
        if (ci == pos - 1) break;
        flag = 1;
      }
    }
  }
  for (int k = 0; k < n; k++) printf("%c", c[k]);
  printf("\n");
  return 0;
}
