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;
char s1[300006], s2[300006];
int set1[26], set2[26];
int main() {
  scanf("%s", &s1);
  scanf("%s", &s2);
  int l = strlen(s1);
  for (int i = 0; i < 26; ++i) {
    set1[i] = set2[i] = 0;
  }
  for (int i = 0; i < l; ++i) {
    set1[s1[i] - 'a']++;
    set2[s2[i] - 'a']++;
  }
  int c1 = l / 2, c2 = l / 2;
  if (l % 2 != 0) {
    c1++;
  }
  int t = 0, fg = 0;
  for (int i = 0; i < 26; ++i) {
    if (fg) {
      set1[i] = 0;
      continue;
    }
    if (t + set1[i] > c1) {
      set1[i] = c1 - t;
      fg = 1;
    }
    t = t + set1[i];
  }
  t = 0, fg = 0;
  for (int i = 25; i >= 0; --i) {
    if (fg) {
      set2[i] = 0;
      continue;
    }
    if (t + set2[i] > c2) {
      set2[i] = c2 - t;
      fg = 1;
    }
    t = t + set2[i];
  }
  int m1, m2;
  for (int i = 25; i >= 0; --i) {
    if (set1[i] != 0) {
      m1 = i;
      break;
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (set2[i] != 0) {
      m2 = i;
      break;
    }
  }
  int j = 0, k = 25;
  int l1 = 0, l2 = 0;
  stack<char> st;
  fg = 0;
  while (1) {
    if (fg) {
      while (set1[j] == 0) j--;
      while (k <= 25 && set2[k] == 0) k++;
      set1[j]--;
      if (k <= 25 && set2[k]) set2[k]--;
      if (l1 < c1) {
        l1++;
        st.push(j);
      }
      if (l2 < c2) {
        l2++;
        st.push(k);
      }
      if (l1 == c1) break;
      continue;
    }
    while (set1[j] == 0) j++;
    while (k >= 0 && set2[k] == 0) k--;
    if (j < k) {
      set1[j]--;
      if (k >= 0 && set2[k]) set2[k]--;
      if (l1 < c1) {
        l1++;
        printf("%c", j + 'a');
      }
      if (l2 < c2) {
        l2++;
        printf("%c", k + 'a');
      }
      if (l1 == c1) break;
    } else {
      fg = 1;
      j = m1;
      k = m2;
    }
  }
  while (!st.empty()) {
    printf("%c", st.top() + 'a');
    st.pop();
  }
  return 0;
}
