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;
string s1;
string s2;
string ans;
int main() {
  cin >> s1;
  cin >> s2;
  int len = s1.size();
  int head = 0;
  int tail = len - 1;
  int head_1 = 0;
  int tail_1 = len - 1;
  int head_2 = 0;
  int tail_2 = len - 1;
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  int cou = len;
  bool button = true;
  while (true) {
    if (button) {
      if (s1[head_1] >= s2[tail_2]) {
        ans[tail] = s1[tail_1];
        tail--;
        tail_1--;
      } else if (s1[head_1] < s2[tail_2]) {
        ans[head] = s1[head_1];
        head++;
        head_1++;
      }
      button = false;
    } else {
      if (s1[head_1] >= s2[tail_2]) {
        ans[tail] = s2[head_2];
        tail--;
        head_2++;
      } else if (s1[head_1] < s2[tail_2]) {
        ans[head] = s2[tail_2];
        head++;
        tail_2--;
      }
      button = true;
    }
    if (cou) {
      cou--;
    } else {
      break;
    }
  }
  for (int i = 0; i < len; i++) {
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
