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;
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s0, s1;
  cin >> s0 >> s1;
  sort(s0.begin(), s0.end());
  sort(s1.begin(), s1.end());
  reverse(s1.begin(), s1.end());
  int n = s0.size();
  int i0 = 0, j0 = (n + 1) / 2;
  int i1 = 0, j1 = n / 2;
  string head, tail;
  while (true) {
    if (s0[i0] >= s1[j1]) {
      tail += s0[--j0];
    } else {
      head += s0[i0++];
    }
    if (--n == 0) break;
    if (s0[i0] >= s1[j1]) {
      tail += s1[--j1];
    } else {
      head += s1[i1++];
    }
    if (--n == 0) break;
  }
  reverse(tail.begin(), tail.end());
  cout << head + tail << endl;
  return 0;
}
