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;
string arr1, arr2;
int main() {
  cin >> arr1 >> arr2;
  sort(arr1.begin(), arr1.end());
  sort(arr2.begin(), arr2.end(), greater<char>());
  string hi = "";
  int qw = -1, yo = arr1.size(), asdf = 0;
  for (int i = 0; i < arr1.size(); i++) {
    if (i % 2 == 0)
      hi += arr1[i / 2];
    else
      hi += arr2[i / 2];
    if (yo % 2 == 0 && i % 2 == 0 && asdf == 0) {
      if (arr2[i / 2] < arr1[i / 2]) qw = i, asdf++;
    }
    if (yo % 2 == 1 && i % 2 == 1 && asdf == 0) {
      cout << arr2[i / 2] << " " << arr1[(i + 1) / 2] << " " << i << '\n';
      if (arr2[i / 2] < arr1[(i + 1) / 2]) qw = i, asdf++;
      cout << qw << '\n';
    }
  }
  if (qw != -1) {
    for (int i = 0; i < qw; i++) cout << hi[i];
    if (yo % 2 == 0) {
      for (int i = qw; i < arr1.size(); i++) {
        if (i % 2 == 0)
          cout << arr2[i / 2];
        else
          cout << arr1[i / 2];
      }
    } else {
      for (int i = qw; i < arr1.size(); i++) {
        if (i % 2 == 0)
          cout << arr2[i / 2];
        else
          cout << arr1[(i + 1) / 2];
      }
    }
  } else
    cout << hi;
  return 0;
}
