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 int MOD = 1e9 + 7;
const int N = 2e6 + 5;
const int K = (1 << 17) + 10;
const long long int INF = 2e18 + 500;
const int inf = 2e9 + 500;
const int SQRT = 500;
const int lgN = 20;
multiset<char> A, B;
char getMax(multiset<char> &S) {
  auto it = S.end();
  it--;
  return *(it);
}
char getMin(multiset<char> &S) { return *(S.begin()); }
int main(int argc, char const *argv[]) {
  cin.sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  for (auto c : s) A.insert(c);
  cin >> s;
  for (auto c : s) B.insert(c);
  int n = s.size();
  int l = 0, r = n - 1;
  string ans = s;
  for (int i = 0; i < n; i++) {
    char amax = getMax(A);
    char amin = getMin(A);
    char bmax = getMax(B);
    char bmin = getMin(B);
    if (i % 2 == 0) {
      if (amin >= bmax) {
        ans[r] = amax;
        A.erase(A.find(amax));
        r -= 1;
      } else {
        ans[l] = amin;
        A.erase(A.find(amin));
        l += 1;
      }
    } else {
      if (bmax <= amin) {
        ans[r] = bmin;
        B.erase(B.find(bmin));
        r -= 1;
      } else {
        ans[l] = bmax;
        B.erase(B.find(bmax));
        l += 1;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
