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

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  priority_queue<char, vector<char>> pb;
  priority_queue<char, vector<char>, greater<int>> pa;
  string tempa, tempb;
  cin >> tempa >> tempb;
  for (int i = 0; i < tempa.size(); ++i) {
    pa.push(tempa[i]);
    pb.push(tempb[i]);
  }
  deque<char> a, b;
  for (int i = 0; i < tempa.size(); ++i) {
    if (i & 1) {
      b.push_back(pb.top());
      pb.pop();
    } else {
      a.push_back(pa.top());
      pa.pop();
    }
  }
  string ans;
  int start = 0, end = tempa.size() - 1;
  stack<char> s, e;
  for (int i = 0; i < tempa.size(); ++i) {
    if (a.empty()) {
      s.push(b.front());
      break;
    }
    if (b.empty()) {
      s.push(a.front());
      break;
    }
    if (!(i & 1)) {
      if (a.front() >= b.front()) {
        e.push(a.back());
        a.pop_back();
      } else {
        s.push(a.front());
        a.pop_front();
      }
    } else {
      if (a.front() >= b.front()) {
        e.push(b.back());
        b.pop_back();
      } else {
        s.push(b.front());
        b.pop_front();
      }
    }
  }
  while (!s.empty()) {
    e.push(s.top());
    s.pop();
  }
  while (!e.empty()) {
    ans.push_back(e.top());
    e.pop();
  }
  cout << ans;
  return 0;
}
