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 = 3e5 + 10;
char a[N], b[N], c[N];
int n;
bool cmp(char x, char y) { return x > y; }
int main() {
  scanf("%s %s", a, b);
  n = strlen(a);
  int m = n;
  sort(a, a + n);
  sort(b, b + n, cmp);
  int x = 0;
  int y = 0;
  int z = 0;
  int t = n - 1;
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      if (b[y] < a[x])
        c[t--] = b[y++];
      else if (b[y] == a[x] && b[y + 1] < a[x])
        c[t--] = b[y++];
      else
        c[z++] = b[y++];
    } else {
      if (a[x] > b[y])
        c[t--] = a[x++];
      else if (a[x] == b[y] && a[x + 1] > b[y])
        c[t--] = a[x++];
      else
        c[z++] = a[x++];
    }
  }
  puts(c);
  return 0;
}
