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 j = 0, i = 0;
  while (1) {
    if (a[i] <= b[i]) {
      c[j++] = a[i];
      if (j == n) {
        FLAG = 1;
        break;
      } else
        c[j++] = b[i++];
      if (j == n) {
        FLAG = 1;
        break;
      }
    } else {
      FLAG = 0;
      pos = j;
      break;
    }
  }
  if (FLAG == 0) {
    j = n - 1;
    int ai = n / 2 + (n % 2 == 1) - 1;
    int bi = n / 2 - 1;
    while (1) {
      c[j--] = a[ai--];
      if (j <= pos - 1) break;
      c[j--] = b[bi--];
      if (j <= pos - 1) break;
    }
  }
  for (int k = 0; k < n; k++) printf("%c", c[k]);
  return 0;
}
