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;
template <typename T>
inline void read(T& x) {
  cin >> x;
}
template <typename T, typename... Types>
inline void read(T& x, Types&... args) {
  cin >> x;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s, t;
  cin >> s >> t;
  long long n = s.size();
  sort((s).begin(), (s).end());
  sort((t).begin(), (t).end());
  reverse((t).begin(), (t).end());
  s.resize((n + 1) / 2);
  t.resize(n / 2);
  string left, right;
  long long i;
  for (i = 0; i < (n + 1) / 2; i++) {
    if (i >= t.size() || s[i] < t[i]) {
      if (left.size() + right.size() < n) left += s[i];
      if (left.size() + right.size() < n) left += t[i];
    } else
      break;
  }
  for (long long j = (n + 1) / 2 - 1, k = n / 2 - 1; i < (n + 1) / 2;
       j--, k--, i++) {
    if (left.size() + right.size() < n) right += s[j];
    if (left.size() + right.size() < n) right += t[k];
  }
  reverse((right).begin(), (right).end());
  cout << left + right << endl;
}
