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() {
  ios::sync_with_stdio(0);
  priority_queue<int, vector<int>, greater<int> > a;
  priority_queue<int> b;
  string s, t;
  cin >> s >> t;
  for (auto c : s) {
    a.push(c);
  }
  for (auto c : t) {
    b.push(c);
  }
  int n = s.size();
  int last = -1;
  string cur = "";
  for (int i = 0; i < n; i++) {
    cur += '?';
  }
  int x = 0, y = n - 1;
  for (int it = 0; it < n; it++) {
    x = min(x, y);
    y = max(x, y);
    if (it % 2 == 0) {
      if (a.top() <= b.top()) {
        cur[x++] = a.top();
        a.pop();
      } else {
        cur[y--] = a.top();
        a.pop();
      }
    } else {
      if (a.top() > b.top()) {
        cur[y--] = b.top();
        b.pop();
      } else {
        cur[x++] = b.top();
        b.pop();
      }
    }
  }
  cout << cur << '\n';
}
