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;
signed main() {
  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());
  string a1 = "", a2 = "";
  for (long long i = 0; i < n; i++) {
    if (i % 2 == 0) {
      a1 += s[i / 2];
      a2 += s[(n + 1) / 2 - 1 - i / 2];
    } else {
      a1 += t[i / 2];
      a2 += t[n / 2 - 1 - i / 2];
    }
  }
  reverse(a2.begin(), a2.end());
  if (a1 > a2)
    cout << a2 << endl;
  else
    cout << a1 << endl;
}
