#include <bits/stdc++.h>
using namespace std;
int c1[30], c2[30];
int main() {
  string a, b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  for (int i = 0; i <= (a.size() - 1) / 2; i++) c1[a[i] - 'a']++;
  for (int i = b.size() - 1; i >= (b.size() + 1) / 2; i--) c2[b[i] - 'a']++;
  int i = a[0] - 'a';
  int fimi = a[(a.size() - 1) / 2] - 'a';
  int j = b[b.size() - 1] - 'a';
  int fimj = b[(b.size() + 1) / 2] - 'a';
  queue<int> q;
  stack<int> p;
  for (int k = 0; k < a.size(); k++) {
    if (!(k % 2)) {
      if (i >= j) {
        p.push(fimi);
        c1[fimi]--;
        while (c1[fimi] == 0) fimi--;
      } else {
        q.push(i);
        c1[i]--;
        while (c1[i] == 0) i++;
      }
    } else {
      if (j > i) {
        q.push(j);
        c2[j]--;
        while (c2[j] == 0) j--;
      } else {
        p.push(fimj);
        c2[fimj]--;
        while (c2[fimj] == 0) fimj++;
      }
    }
  }
  while (!q.empty()) {
    printf("%c", 'a' + q.front());
    q.pop();
  }
  while (!p.empty()) {
    printf("%c", 'a' + p.top());
    p.pop();
  }
  printf("\n");
}
