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[310000];
char s2[310000];
char ans[310000];
bool cmp(char a, char b) { return a > b; }
int main() {
  scanf("%s%s", s1, s2);
  int len = strlen(s1);
  sort(s1, s1 + len);
  sort(s2, s2 + len, cmp);
  int cnt = 0, t1 = 0, t2 = 0, flag = 1;
  while (true) {
    if (s2[t2] <= s1[t1]) {
      int l = len - cnt;
      int o1;
      int o2;
      if (flag) {
        o1 = (l + 1) / 2;
        o2 = l - o1;
      } else {
        o2 = (l + 1) / 2;
        o1 = l - o2;
      }
      for (int i = len - 1; i >= cnt; i--) {
        if (flag)
          ans[i] = s1[t1 + --o1];
        else
          ans[i] = s2[t2 + --o2];
        flag ^= 1;
      }
      break;
    } else {
      ans[cnt++] = s1[t1++];
      if (s1[t1] < s2[t2])
        ans[cnt++] = s2[t2++];
      else
        flag = 0;
    }
    if (cnt >= len) break;
  }
  ans[len] = 0;
  puts(ans);
  return 0;
}
