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;
char a[500005], b[500005], ans[500005];
int main() {
  ios_base::sync_with_stdio(0);
  string s1, s2;
  deque<char> c, d;
  cin >> s1 >> s2;
  long long int n1 = s1.size(), n2 = s2.size(), l = 0, m = s2.size() - 1;
  ans[n2] = '\0';
  for (int i = 0; i < n1; ++i) a[i] = s1[i];
  for (int i = 0; i < n2; ++i) b[i] = s2[i];
  sort(a, a + n1);
  sort(b, b + n2);
  reverse(b, b + n2);
  stack<char> st;
  for (int i = 0; i < (n1 + 1) / 2; ++i) c.push_back(a[i]);
  for (int i = 0; i < n2 / 2; ++i) d.push_back(b[i]);
  for (; c.size() && d.size();) {
    if (d.size() == 0 || c.front() < d.front()) {
      ans[l++] = c.front();
      c.pop_front();
    } else {
      for (; c.size() || d.size();) {
        if (c.size()) {
          st.push(c.back());
          c.pop_back();
        }
        if (d.size()) {
          st.push(d.back());
          d.pop_back();
        }
      }
      break;
    }
    if (c.size() == 0 || d.front() > c.front()) {
      ans[l++] = d.front();
      d.pop_front();
    } else {
      for (; c.size() || d.size();) {
        if (d.size()) {
          st.push(d.back());
          d.pop_back();
        }
        if (c.size()) {
          st.push(c.back());
          c.pop_back();
        }
      }
      break;
    }
  }
  cout << ans;
  while (!st.empty()) {
    cout << st.top();
    st.pop();
  }
}
