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;
const long long Inf = 1e9 + 7;
namespace myspace {
const int N = 1e5 + 7;
int n;
string s;
string t;
void solve() {
  cin >> s;
  cin >> t;
  n = s.size();
  sort(s.begin(), s.end());
  sort(t.begin(), t.end());
  int p = 0;
  int q = n - 1;
  int turn = 0;
  string res(n, '?');
  int l = 0;
  int r = n - 1;
  bool normal = true;
  while (l <= r) {
    if (turn == 0) {
      if (s[p] >= t[q]) {
        if (normal) {
          int remain = (r - l + 2) / 2;
          p += remain - 1;
          res[r] = s[p];
          p--;
          r--;
          normal = false;
        } else {
          res[r] = s[p];
          p--;
          r--;
        }
      } else {
        res[l] = s[p];
        p++;
        l++;
      }
    } else {
      if (t[q] <= s[p]) {
        if (normal) {
          int remain = (r - l + 1) / 2;
          q -= remain - 1;
          res[r] = t[q];
          q++;
          r--;
          normal = false;
        } else {
          res[r] = t[q];
          q++;
          r--;
        }
      } else {
        res[l] = t[q];
        q--;
        l++;
      }
    }
    turn = 1 - turn;
  }
  cout << res << '\n';
}
};  // namespace myspace
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(9);
  cout << fixed;
  myspace::solve();
  return 0;
}
