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;
  int length = 0, flag;
  int pa_q = 0, pb_q = 0, pa_h = 0, pb_h = 0;
  while (cin >> a >> b) {
    string p_q = "", p_h = "";
    string temp = "";
    sort(a.begin(), a.end());
    sort(b.begin(), b.end());
    length = a.size();
    flag = 0;
    pa_q = 0, pb_q = 0;
    pa_h = a.size() - 1, pb_h = b.size() - 1;
    while (length--) {
      ++flag;
      if (flag % 2 == 1) {
        if (a[pa_q] > b[pb_h]) {
          temp = p_h;
          p_h = a[pa_h];
          p_h = p_h + temp;
          pa_h--;
        } else {
          p_q += a[pa_q];
          pa_q++;
        }
      } else if (flag % 2 == 0) {
        if (b[pb_h] < a[pa_q]) {
          temp = p_h;
          p_h = b[pb_q];
          p_h += temp;
          pb_q++;
        } else {
          p_q += b[pb_h];
          pb_h--;
        }
      }
    }
    cout << p_q << p_h << endl;
  }
  return 0;
}
