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;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s11, s22;
  cin >> s11 >> s22;
  sort(s11.begin(), s11.end());
  sort(s22.begin(), s22.end(), greater<char>());
  stack<char> end;
  queue<char> start;
  int n = s11.size();
  s11 = s11.substr(0, n & 1 ? n / 2 + 1 : n / 2);
  s22 = s22.substr(0, n / 2);
  deque<char> s1, s2;
  s1.assign(s11.begin(), s11.end());
  s2.assign(s22.begin(), s22.end());
  for (int j = 0; j < (n); ++j) {
    if (!(j & 1)) {
      if (s1.front() < s2.front()) {
        start.push(s1.front());
        s1.pop_front();
      } else {
        char c = s1.back();
        end.push(c);
        s1.pop_back();
      }
    } else {
      if (s2.front() > s1.front()) {
        start.push(s2.front());
        s2.pop_front();
      } else {
        char c = s2.back();
        end.push(c);
        s2.pop_back();
      }
    }
  }
  string answer;
  while (!start.empty()) {
    answer += start.front();
    start.pop();
  }
  while (!end.empty()) {
    answer += end.top();
    end.pop();
  }
  cout << answer;
}
