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;
void solve() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  int n = a.size();
  bool boo = true;
  string company = "";
  for (int i = 0; i < n; i++) company += '?';
  for (int i = 0; i < n; i++) {
    if (company[i] != '?') continue;
    if (boo) {
      company[i] = a[0];
      a.erase(a.begin() + 0);
    } else {
      if (a[0] == b[0]) {
        bool f = false;
        for (int j = i + 1; j < n; j++) {
          if (company[j] == '?') {
            f = true;
            company[j] = b[0];
            break;
          }
        }
        if (!f) company[i] = b[0];
      } else {
        company[i] = b[0];
      }
      b.erase(b.begin() + 0);
    }
    boo = !boo;
  }
  cout << company;
}
