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;
bool cmp(char a, char b) { return a > b; }
int main() {
  string a;
  string b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end(), cmp);
  int b_turns = b.size() / 2;
  int a_turns = b.size() - b_turns;
  deque<char> aa, bb;
  for (int i = 0; i < b_turns; i++) {
    bb.push_back(b[i]);
  }
  for (int i = 0; i < a_turns; i++) {
    aa.push_back(a[i]);
  }
  string front_q = "";
  string back_q = "";
  bool turn = true;
  for (int i = 0; i < b.size(); i++) {
    if (turn) {
      if (aa[0] < bb[0]) {
        front_q += aa[0];
        aa.pop_front();
      } else {
        back_q += aa[aa.size() - 1];
        aa.pop_back();
      }
    } else {
      if (bb[0] > aa[0]) {
        front_q += bb[0];
        bb.pop_front();
      } else {
        back_q += bb[bb.size() - 1];
        bb.pop_back();
      }
    }
    turn = !turn;
  }
  cout << front_q;
  for (int i = back_q.size() - 1; i >= 0; i--) {
    cout << back_q[i];
  }
  cout << endl;
}
