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 a, b;
  cin >> a >> b;
  vector<int> as('z' - 'a' + 1, 0);
  for (int i = 0; i < a.length(); i++) {
    as[a[i] - 'a']++;
  }
  vector<int> bs('z' - 'a' + 1, 0);
  for (int i = 0; i < b.length(); i++) {
    bs[b[i] - 'a']++;
  }
  int N = a.length();
  vector<char> c(N);
  int cFrom = 0;
  int cTo = N - 1;
  int minAIndex = 0;
  int maxBIndex = 'z' - 'a';
  while (as[minAIndex] == 0) minAIndex++;
  while (bs[maxBIndex] == 0) maxBIndex--;
  for (int i = 0; i < N; i++) {
    if (i % 2 == 0) {
      if (minAIndex < maxBIndex) {
        c[cFrom] = 'a' + minAIndex;
        cFrom++;
        as[minAIndex]--;
        while (as[minAIndex] == 0) minAIndex++;
      } else {
        int predstoit = (N + 1 - i) / 2;
        int tempIndex = minAIndex;
        while (predstoit > as[tempIndex]) {
          predstoit -= as[tempIndex];
          tempIndex++;
        }
        c[cTo] = 'a' + tempIndex;
        cTo--;
        as[tempIndex]--;
        while (as[minAIndex] == 0) minAIndex++;
      }
    } else {
      if (maxBIndex > minAIndex) {
        c[cFrom] = 'a' + maxBIndex;
        cFrom++;
        bs[maxBIndex]--;
        while (bs[maxBIndex] == 0) maxBIndex--;
      } else {
        int predstoit = (N + 1 - i) / 2;
        int tempIndex = maxBIndex;
        while (predstoit > bs[tempIndex]) {
          predstoit -= bs[tempIndex];
          tempIndex--;
        }
        c[cTo] = 'a' + tempIndex;
        cTo--;
        bs[tempIndex]--;
        while (bs[maxBIndex] == 0) maxBIndex--;
      }
    }
  }
  for (int i = 0; i < N; i++) cout << c[i];
  return 0;
}
