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;
const double pi = 3.1415926535897932384626433832795;
const int inf = 1e9;
const long long inf2 = 1e18;
const int mod = 1e9 + 7;
void boost() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
void solve() {
  string s1, s2;
  cin >> s1 >> s2;
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  int n = s1.size();
  int l1 = (n + 1) / 2, l2 = n / 2;
  l1 = n - l1;
  l2 = n - l2;
  reverse(s2.begin(), s2.end());
  while (l1--) s1.pop_back();
  while (l2--) s2.pop_back();
  l1 = (n + 1) / 2;
  l2 = (n) / 2;
  int i = 0, j = n - 1, i1 = 0, j1 = l1 - 1, i2 = 0, j2 = l2 - 1;
  int t = 0;
  char ans[n];
  while (i <= j) {
    if (!t) {
      if (i2 > j2 || s1[i1] > s2[i2]) {
        ans[j] = s1[j1];
        j--;
        j1--;
      } else {
        ans[i] = s1[i1];
        i++;
        i1++;
      }
    } else {
      if (i1 > j1 || s2[i2] < s1[i1]) {
        ans[j] = s2[j2];
        j2--;
        j--;
      } else {
        ans[i] = s2[i2];
        i2++;
        i++;
      }
    }
    t ^= 1;
  }
  for (int i = 0; i < n; ++i) cout << ans[i];
  return;
}
int main() {
  boost();
  int tc = 1;
  while (tc--) solve();
  return 0;
}
