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 int maxn = 2505;
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  string ans(n, ' ');
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  int la = 0, ra = n - 1, lb = 0, rb = n - 1, lans = 0, rans = n - 1;
  int turn = 0;
  while (lans <= rans) {
    if (turn == 0) {
      if (a[la] >= b[rb]) {
        ans[rans] = a[ra];
        rans--, ra--;
      } else {
        ans[lans] = a[la];
        lans++, la++;
      }
    } else {
      if (b[rb] <= a[la]) {
        ans[rans] = b[lb];
        rans--, lb++;
      } else {
        ans[lans] = b[rb];
        lans++, rb--;
      }
    }
    turn = 1 - turn;
  }
  cout << ans << endl;
  return 0;
}
