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;
char a[300010], b[300010];
char x[300010];
bool cmp1(char a, char b) { return a < b; }
bool cmp2(char a, char b) { return a > b; }
int main() {
  cin >> a >> b;
  int l = strlen(a);
  sort(a, a + l, cmp1);
  sort(b, b + l, cmp2);
  bool k = 0, f = 0;
  int c1 = 0, c2 = 0;
  int i = 0;
  for (; i < l; i++) {
    if (a[c1] >= b[c2]) {
      f = 1;
      break;
    }
    if (!k) {
      x[i] = a[c1];
      k = 1;
      c1++;
    } else {
      x[i] = b[c2];
      k = 0;
      c2++;
    }
  }
  if (f) {
    int j = l - 1;
    if (!(l % 2)) {
      c1 = l / 2 - 1, c2 = l / 2 - 1;
    } else {
      c1 = l / 2, c2 = l / 2 - 1;
    }
    for (; j >= i; j--) {
      if (!k) {
        x[j] = a[c1];
        c1--;
        k = 1;
      } else {
        x[j] = b[c2];
        c2--;
        k = 0;
      }
    }
  }
  for (int i = 0; i < l; i++) cout << x[i];
  cout << endl;
  return 0;
}
