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;
vector<char> v[2];
char ans[300300];
int n;
int main() {
  ios_base::sync_with_stdio(0);
  string tmp;
  cin >> tmp;
  n = tmp.size();
  for (int i = 0; i < n; i++) v[0].push_back(tmp[i]);
  cin >> tmp;
  for (int i = 0; i < n; i++) v[1].push_back(tmp[i]);
  sort(v[1].begin(), v[1].end());
  sort(v[0].rbegin(), v[0].rend());
  int pos = 0;
  while (pos < n) {
    if (v[0].back() > v[1].back()) break;
    ans[pos] = v[pos % 2].back();
    v[pos % 2].pop_back();
    pos++;
  }
  reverse(v[0].begin(), v[0].end());
  reverse(v[1].begin(), v[1].end());
  int rem = n - pos;
  while (true) {
    if ((int)v[0].size() + (int)v[1].size() > rem + 1) {
      v[0].pop_back();
      v[1].pop_back();
      continue;
    }
    break;
  }
  if ((int)v[0].size() + (int)v[1].size() == rem + 1) {
    v[!(pos % 2)].pop_back();
  }
  int END = n - 1;
  while (rem) {
    rem--;
    ans[END] = v[pos % 2].back();
    v[pos % 2].pop_back();
    END--;
    pos++;
  }
  for (int i = 0; i < n; i++) cout << ans[i];
  cout << endl;
  return 0;
}
