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 n;
vector<pair<int, char> > vt;
string a, b;
char c[300005], d[300005];
bool cmp(char e, char f) { return e > f; }
int main() {
  ios_base::sync_with_stdio(0);
  cin >> a;
  cin >> b;
  n = a.length();
  for (int i = 0; i < n; i++) c[i] = a[i];
  for (int i = 0; i < n; i++) d[i] = b[i];
  sort(c, c + n);
  sort(d, d + n, cmp);
  int turn = 1, i = 0, j = 0, leng = 0, leng1 = n - 1;
  while (n--) {
    if (turn == 1) {
      if (c[i] <= d[j]) {
        vt.push_back(pair<int, char>(leng, c[i]));
        leng++;
      } else {
        vt.push_back(pair<int, char>(leng1, c[i]));
        leng1--;
      }
      i++;
    } else {
      if (d[j] >= c[i]) {
        vt.push_back(pair<int, char>(leng, d[j]));
        leng++;
      } else {
        vt.push_back(pair<int, char>(leng1, d[j]));
        leng1--;
      }
      j++;
    }
    turn = 3 - turn;
  }
  sort(vt.begin(), vt.end());
  for (int i = 0; i < vt.size(); i++) {
    pair<int, char> t = vt[i];
    cout << t.second;
  }
}
