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_base::sync_with_stdio(0);
  cin.tie(0);
  string s, t, ans;
  cin >> s >> t;
  ans = s;
  int n = ans.size();
  sort(s.begin(), s.end());
  sort(t.begin(), t.end());
  map<char, int> mp1, mp2;
  for (int i = 0; i < (n + 1) / 2; i++) {
    mp1[s[i]]++;
  }
  for (int i = t.size() - 1; i >= t.size() - n / 2; i--) {
    mp2[t[i]]++;
  }
  bool flag = 0;
  int st = 0, e = ans.size() - 1, turn = 1;
  while (st <= e) {
    map<char, int>::iterator it1 = mp1.begin();
    map<char, int>::iterator it2 = mp2.end();
    if (!mp2.empty()) it2--;
    if (it1->first >= it2->first) flag = 1;
    if (turn++ & 1) {
      if (!flag) {
        ans[st++] = it1->first;
        it1->second--;
        if (it1->second == 0) mp1.erase(it1->first);
      } else {
        map<char, int>::iterator tmp = mp1.end();
        tmp--;
        ans[e--] = tmp->first;
        tmp->second--;
        if (tmp->second == 0) mp1.erase(tmp->first);
      }
    } else {
      if (!flag) {
        ans[st++] = it2->first;
        it2->second--;
        if (it2->second == 0) mp2.erase(it2->first);
      } else {
        map<char, int>::iterator tmp = mp2.begin();
        ans[e--] = tmp->first;
        tmp->second--;
        if (tmp->second == 0) mp2.erase(tmp->first);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
