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 ol, ig;
  cin >> ol >> ig;
  int n = ol.size();
  sort(ol.begin(), ol.end());
  sort(ig.begin(), ig.end(), std::greater<char>());
  int ol_pos = 0, ig_pos = 0;
  int num_print = 0;
  while (num_print < n) {
    if (!(num_print % 2)) {
      if (ol[ol_pos] <= ig[ig_pos]) {
        cout << ol[ol_pos++];
        ++num_print;
      } else {
        break;
      }
    } else {
      cout << ig[ig_pos++];
      ++num_print;
    }
  }
  if (n - num_print == 1) {
    cout << ol[ol_pos++];
    return 0;
  }
  if (n - num_print == 2) {
    cout << ig[ig_pos++] << ol[ol_pos++];
    return 0;
  }
  int diff = n - num_print;
  for (int i = 0; i < diff >> 1; ++i) {
    cout << ig[ig_pos++];
    ++num_print;
  }
  for (int i = num_print; i < n; ++i) {
    cout << ol[ol_pos++];
  }
  return 0;
}
