bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const double PI = acos(-1);
using namespace std;
int cnt[2][128];
char out[1 << 20];
deque<char> I[2];
int n;
int main() {
  string A, B;
  cin >> A >> B;
  I[0] = deque<char>(A.begin(), A.end());
  I[1] = deque<char>(B.begin(), B.end());
  sort(I[0].begin(), I[0].end());
  sort(I[1].begin(), I[1].end());
  n = ((int)I[0].size());
  while (((int)I[0].size()) > (n + 1) / 2) I[0].pop_back();
  while (((int)I[1].size()) > n / 2) I[1].pop_front();
  deque<char> U, V;
  int i, turn;
  for (i = 0, turn = 0; i < n; i++, turn ^= 1) {
    if (I[0].front() >= I[1].back()) {
      if (turn == 0) {
        V.push_front(I[0].back());
        I[0].pop_back();
      } else {
        V.push_front(I[1].front());
        I[1].pop_front();
      }
    } else {
      if (turn == 0) {
        U.push_back(I[0].front());
        I[0].pop_front();
      } else {
        U.push_back(I[1].back());
        I[1].pop_back();
      }
    }
  }
  for (char c : U) putchar(c);
  for (char c : V) putchar(c);
  puts("");
  return 0;
}
