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;
  long long n = s1.length();
  multiset<char> m1, m2;
  for (long long i = 0; i < n; i++) {
    m1.insert(s1[i]);
    m2.insert(s2[i]);
  }
  string t1 = "", t2 = "";
  for (multiset<char>::iterator it = m1.begin(); it != m1.end(); it++)
    t1 += (*it);
  for (multiset<char>::iterator it = m2.begin(); it != m2.end(); it++)
    t2 += (*it);
  string fin = "";
  long long i1 = 0, i2 = n - 1;
  long long cnt = 0;
  char arr[n];
  long long pos = 0;
  long long inc = 1;
  bool flag = true;
  {
    while (t1[i1] < t2[i2] && cnt < n) {
      if (flag) {
        arr[pos] = t1[i1];
        inc = 1;
        cnt++;
        flag = false;
        pos += inc;
        i1++;
      } else {
        arr[pos] = t2[i2];
        inc = 1;
        cnt++;
        flag = true;
        pos += inc;
        i2--;
      }
    }
    pos = n - 1;
    inc = -1;
    i1 = ceil((1.0 * n) / 2) - 1;
    i2 = (n / 2) - 1;
    while (cnt < n) {
      if (flag) {
        arr[pos] = t1[i1];
        cnt++;
        flag = false;
        pos += inc;
        i1 += inc;
      } else {
        arr[pos] = t2[i2];
        cnt++;
        flag = true;
        pos += inc;
        i2 -= inc;
      }
    }
  }
  for (long long i = 0; i < n; i++) cout << arr[i];
  cout << endl;
}
