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:10240000000,10240000000")
using namespace std;
int main() {
  string s, t;
  while (cin >> s >> t) {
    sort(s.begin(), s.end());
    sort(t.begin(), t.end());
    reverse(t.begin(), t.end());
    deque<char> a, b;
    int n = s.size();
    for (int i = 0; i < (n + 1) / 2; i++) {
      a.push_back(s[i]);
    }
    for (int i = 0; i < (n) / 2; i++) {
      b.push_back(t[i]);
    }
    string res1 = "", res2 = "";
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        if (!b.empty() && a.front() > b.front()) {
          res2 = a.back() + res2;
          a.pop_back();
        } else {
          res1 += a.front();
          a.pop_front();
        }
      } else {
        if (!a.empty() && b.front() < a.front()) {
          res2 = b.back() + res2;
          b.pop_back();
        } else {
          res1 += b.front();
          b.pop_front();
        }
      }
    }
    cout << res1 + res2 << endl;
  }
  return 0;
}
