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 main() {
  string s1, s2;
  cin >> s1 >> s2;
  int i;
  char a1[300005], a2[300005];
  int count = 0;
  for (i = 0; i < s1.length(); i++) {
    a1[i] = s1[i];
    a2[i] = s2[i];
  }
  sort(a1, a1 + i);
  sort(a2, a2 + i);
  reverse(a2, a2 + i);
  for (i = 0; i < s1.length(); i++) {
    if (s1[i] <= s2[i]) break;
  }
  int j = i;
  int p = 1;
  char ans[300005];
  int gt = j / 2;
  int tg = gt;
  if (s1.length() % 2 == 1) tg--;
  for (int l = 0; l < j; l += 2) {
    if (count >= s1.length()) break;
    if (gt < 0) break;
    ans[s1.length() - p] = a1[gt];
    count++;
    p++;
    if (count >= s2.length()) break;
    ans[s1.length() - p] = a2[tg];
    p++;
    count++;
    gt--;
    tg--;
  }
  p = 0;
  for (int o = j; o < s1.length(); o++) {
    if (count >= s1.length()) break;
    count++;
    ans[p++] = a1[o];
    if (count < s1.length()) {
      ans[p++] = a2[o];
      count++;
    } else
      break;
  }
  for (int i = 0; i < s1.length(); i++) {
    cout << ans[i] << "";
  }
  cout << endl;
  return 0;
}
