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 n;
string s1, s2;
int c1[30], c2[30];
char ans[300010];
int min1() {
  for (int i = 0; i < 26; i++)
    if (c1[i]) return i;
}
int max2() {
  for (int i = 25; i >= 0; i--)
    if (c2[i]) return i;
}
int main() {
  cin >> s1 >> s2;
  n = s1.length();
  for (int i = 0; i < n; i++) c1[s1[i] - 'a']++;
  for (int i = 0; i < n; i++) c2[s2[i] - 'a']++;
  int st = 0, ed = n, mx2, mn1;
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      mx2 = max2();
      mn1 = min1();
      if (mx2 > mn1) {
        ans[st++] = 'a' + mx2;
        c2[mx2]--;
      } else {
        ans[--ed] = 'a' + mx2;
        c2[mx2]--;
      }
    } else {
      mn1 = min1();
      mx2 = max2();
      if (mn1 < mx2) {
        ans[st++] = 'a' + mn1;
        c1[mn1]--;
      } else {
        ans[--ed] = 'a' + mn1;
        c1[mn1]--;
      }
    }
  }
  printf("%s\n", ans);
  return 0;
}
