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;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  sort(s1.begin(), s1.end());
  sort(s2.rbegin(), s2.rend());
  int n = s1.size();
  string s3;
  int i;
  for (i = 0; i < n / 2; i++) {
    if (s1[i] > s2[i]) break;
    s3.push_back(s1[i]);
    s3.push_back(s2[i]);
  }
  string s4, s5;
  s4 = s1.substr(i, (n + 1) / 2 - i);
  s5 = s2.substr(i, n / 2 - i);
  s3 += s5;
  s3 += s4;
  cout << s3;
}
