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 a[300010], b[300010], ans[300010];
int n, l, r;
priority_queue<int, vector<int>, greater<int> > qa;
priority_queue<int, vector<int>, less<int> > qb;
int main() {
  gets(a);
  gets(b);
  n = strlen(a);
  for (int i = 0; i < n; i++) qa.push(a[i]);
  for (int i = 0; i < n; i++) qb.push(b[i]);
  int cnt = 0;
  l = 0;
  r = n - 1;
  char tmp1, tmp2;
  while (cnt < n) {
    tmp1 = qa.top();
    qa.pop();
    tmp2 = qb.top();
    qb.pop();
    if (tmp1 < tmp2)
      ans[l++] = tmp1;
    else
      ans[r--] = tmp1;
    cnt++;
    if (cnt == n) break;
    tmp1 = qa.top();
    if (tmp1 < tmp2)
      ans[l++] = tmp2;
    else
      ans[r--] = tmp2;
    cnt++;
  }
  ans[n] = '\0';
  puts(ans);
  return 0;
}
