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;
const int N = 3e5 + 10;
char ans[N];
multiset<int> a1, a2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string t, s;
  cin >> t >> s;
  int n = t.length();
  int l = 0, r = n - 1;
  for (int i = 0; i < n; i++) {
    char ch = t[i];
    a1.insert((int)(ch - 'a'));
  }
  for (int i = 0; i < n; i++) {
    char ch = s[i];
    a2.insert((int)(ch - 'a'));
  }
  for (int i = 0; i < n; i++) {
    int mn1 = *a1.begin(), mx2 = *a2.rbegin();
    int mn2 = *a2.begin(), mx1 = *a1.rbegin();
    if (i % 2 == 0) {
      if (mn1 < mx2)
        ans[l++] = (char)(mn1 + 'a'), a1.erase(a1.find(mn1));
      else
        ans[r--] = (mx1 + 'a'), a1.erase(a1.find(mx1));
    } else {
      if (mx2 >= mn1)
        ans[l++] = (char)(mx2 + 'a'), a2.erase(a2.find(mx2));
      else
        ans[r--] = (mn2 + 'a'), a2.erase(a2.find(mn2));
    }
  }
  cout << ans << endl;
  return 0;
}
