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;
int c1[30], c2[30];
int main() {
  string a, b;
  cin >> a >> b;
  int menor, maior;
  for (int i = 0; i < a.size(); i++) {
    c1[a[i] - 'a']++;
    c2[b[i] - 'a']++;
    if (!i) {
      menor = a[i] - 'a';
      maior = b[i] - 'a';
    }
    menor = min(menor, a[i] - 'a');
    maior = max(maior, b[i] - 'a');
  }
  int i = menor;
  int j = maior;
  queue<int> q;
  stack<int> p;
  for (int k = 0; k < a.size(); k++) {
    if (!(k % 2)) {
      if (i > j) {
        p.push(i);
        c1[i]--;
        while (c1[i] == 0) i++;
      } 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(j);
        c2[j]--;
        while (c2[j] == 0) j--;
      }
    }
  }
  while (!q.empty()) {
    printf("%c", 'a' + q.front());
    q.pop();
  }
  while (!p.empty()) {
    printf("%c", 'a' + p.top());
    p.pop();
  }
  printf("\n");
}
