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 main() {
  int i;
  vector<char> arr(26);
  for (i = 0; i < 26; i++) arr[i] = i + 'a';
  int n, a;
  string s;
  cin >> s;
  multiset<int> s1, s2;
  n = s.size();
  for (i = 0; i < n; i++) s1.insert(s[i] - 'a');
  cin >> s;
  for (i = 0; i < n; i++) s2.insert(s[i] - 'a');
  multiset<int>::iterator it1, it2;
  it1 = s1.begin();
  it2 = s2.end();
  if (n == 1) {
    it2--;
    if (*it1 <= *it2)
      cout << arr[*it1];
    else
      cout << arr[*it2];
  } else {
    while (n > 2) {
      it1 = s1.begin();
      it2 = s2.end();
      it2--;
      cout << arr[*it1];
      s1.erase(it1);
      cout << arr[*it2];
      s2.erase(it2);
      n -= 2;
    }
    if (n == 2) {
      it1 = s1.begin();
      it2 = s2.end();
      it2--;
      if (*it1 >= *it2) {
        cout << arr[*it2];
        cout << arr[*it1];
      } else {
        cout << arr[*it1];
        cout << arr[*it2];
      }
    }
    if (n == 1) {
      it1 = s1.begin();
      cout << arr[*it1];
    }
  }
  return 0;
}
