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 oleg;
  cin >> oleg;
  string ivy;
  cin >> ivy;
  int l1 = oleg.size();
  int arr1[l1];
  int arr2[l1];
  int i, j;
  for (int j = 0; j < l1; j++) arr1[j] = oleg[j] - 'a';
  for (int j = 0; j < l1; j++) arr2[j] = ivy[j] - 'a';
  sort(arr1, arr1 + l1);
  sort(arr2, arr2 + l1);
  int arr3[l1];
  int fp = 0;
  int rp = l1 - 1;
  int trav = 0;
  int trav2 = l1 - 1;
  for (j = 0; j < l1; j++) {
    if (j % 2 == 0) {
      if (arr1[trav] <= arr2[trav2]) {
        arr3[fp++] = arr1[trav];
        trav++;
      } else {
        arr3[rp--] = arr1[trav];
        trav++;
      }
    } else {
      if (arr2[trav2] < arr1[trav]) {
        arr3[rp--] = arr2[trav2];
        trav2--;
      } else {
        arr3[fp++] = arr2[trav2];
        trav2--;
      }
    }
  }
  for (i = 0; i < l1; i++) printf("%c", arr3[i] + 'a');
  return 0;
}
