bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
using namespace std;
string s1, s2;
int len;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> s1 >> s2;
  len = s1.length();
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  reverse(s2.begin(), s2.end());
  int a = 0, b = 0, i = 0;
  for (; i < len; i++) {
    if (i & 1) {
      if (s1[a] >= s2[b]) break;
      cout << s2[b++];
    } else {
      if (s1[a] >= s2[b]) break;
      cout << s1[a++];
    }
  }
  int cnt = 0;
  len -= a + b;
  int c, d;
  if (len & 1) {
    if (i & 1)
      c = len / 2, d = len / 2 + 1;
    else
      c = len / 2 + 1, d = len / 2;
  } else
    c = len / 2, d = len / 2;
  a = a + c - 1;
  b = b + d - 1;
  string tmp = "";
  for (; i < len; i++) {
    if (i & 1) {
      tmp.push_back(s2[b]);
      b--;
    } else {
      tmp.push_back(s1[a]);
      a--;
    }
  }
  reverse(tmp.begin(), tmp.end());
  cout << tmp << endl;
  return 0;
}
