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 double PI = acos(-1.0);
const int MAX = 300008;
int n;
string second, p;
int a[50], b[50];
char ans[MAX];
set<int> pos;
int getFirst() {
  int r = *(pos.begin());
  pos.erase(r);
  return r;
}
int getLast() {
  int r = *(pos.rbegin());
  pos.erase(r);
  return r;
}
int main() {
  cin >> second >> p;
  n = (int)second.size();
  sort(second.begin(), second.end());
  sort(p.begin(), p.end());
  reverse(p.begin(), p.end());
  second = second.substr(0, n / 2 + n % 2);
  p = p.substr(0, n / 2);
  for (int i = 0; i < ((int)(second).size()); i++) a[second[i] - 'a']++;
  for (int i = 0; i < ((int)(p).size()); i++) b[p[i] - 'a']++;
  for (int i = 0; i < n; i++) pos.insert(i);
  for (int it = 0, t = 0; it < n; it++, t = 1 - t) {
    if (t == 0) {
      int first = -1;
      for (int i = 0; i < 26 && first == -1; i++)
        if (a[i]) first = i;
      int l = -1;
      for (int i = 25; i >= 0 && l == -1; i--)
        if (b[i]) l = i;
      if (first >= l && pos.size() > 1) {
        l = -1;
        for (int i = 25; i >= 0 && l == -1; i--)
          if (a[i]) l = i;
        int ind = getLast();
        ans[ind] = char(l + 'a');
        a[l]--;
      } else {
        int ind = getFirst();
        ans[ind] = char(first + 'a');
        a[first]--;
      }
    } else {
      int l = -1;
      for (int i = 25; i >= 0 && l == -1; i--)
        if (b[i]) l = i;
      int first = -1;
      for (int i = 0; i < 26 && first == -1; i++)
        if (a[i]) first = i;
      if (l <= first && pos.size() > 1) {
        first = -1;
        for (int i = 0; i < 26 && first == -1; i++)
          if (b[i]) first = i;
        int ind = getLast();
        ans[ind] = char(first + 'a');
        b[first]--;
      } else {
        int ind = getFirst();
        ans[ind] = char(l + 'a');
        b[l]--;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i];
  cout << endl;
  return 0;
}
