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 Set(int N, int p) { return N |= (1 << p); }
int Reset(int N, int p) { return N &= ~(1 << p); }
bool Check(int N, int p) { return N & (1 << p); }
const int dr[] = {0, -1, 0, 1, -1, -1, 1, 1};
const int dc[] = {1, 0, -1, 0, 1, -1, -1, 1};
const int maxx = 0;
deque<char> l, r;
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  sort(a.begin(), a.end());
  sort(b.rbegin(), b.rend());
  a = a.substr(0, ((n + 1) / 2));
  b = b.substr(0, (n / 2));
  sort(b.begin(), b.end());
  for (int i = 0; i < n; i++) {
    if (!(i & 1)) {
      if (a[0] < b[b.size() - 1]) {
        l.push_back(a[0]);
        a.erase(a.begin());
      } else {
        r.push_front(a[a.size() - 1]);
        a.erase(a.begin() + a.size() - 1);
      }
    } else {
      if (b[b.size() - 1] <= a[0]) {
        r.push_front(b[0]);
        b.erase(b.begin());
      } else {
        l.push_back(b[b.size() - 1]);
        b.erase(b.begin() + b.size() - 1);
      }
    }
  }
  while (l.size()) {
    cout << l.front();
    l.pop_front();
  }
  while (r.size()) {
    cout << r.front();
    r.pop_front();
  }
  cout << endl;
  return 0;
}
