#include <bits/stdc++.h>
using namespace std;
int n;
string a, b;
int ha[30], hb[30];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> a >> b;
  n = a.size();
  for (int i = (0); i < a.size(); i++) ha[a[i] - 'a']++;
  for (int i = (0); i < b.size(); i++) hb[b[i] - 'a']++;
  int aned = (n + 2 - 1) / 2, bned = n / 2;
  for (int i = (0); i < 27; i++) {
    if (ha[i] <= aned)
      aned -= ha[i];
    else {
      while (ha[i] != aned) ha[i]--;
      aned = 0;
    }
    if (!aned) {
      for (int j = (i + 1); j < 27; j++) ha[j] = 0;
    }
  }
  for (int i = (27); i > -1; i--) {
    if (hb[i] <= bned)
      bned -= hb[i];
    else {
      while (hb[i] != bned) hb[i]--;
      bned = 0;
    }
    if (!bned) {
      for (int j = (0); j < i; j++) hb[j] = 0;
    }
  }
  string ans(n, '?');
  int pos = 0;
  for (int i = (0); i < n; i++) {
    int fg = 1;
    int al, bl;
    for (int j = (0); j < 27; j++)
      if (ha[j]) {
        al = j;
        break;
      }
    for (int j = (27); j > -1; j--)
      if (hb[j]) {
        bl = j;
        break;
      }
    if (al >= bl) break;
    pos = i + 1;
    if (0 == (i & 0x1)) {
      for (int j = (0); j < 27; j++) {
        if (ha[j]) {
          ans[i] = 'a' + j;
          ha[j]--;
          break;
        }
      }
    } else {
      for (int j = (27); j > -1; j--) {
        if (hb[j]) {
          ans[i] = 'a' + j;
          hb[j]--;
          break;
        }
      }
    }
  }
  if (pos != n) {
    for (int i = (pos); i < n; i++) {
      int xinpos = n - (i - pos) - 1;
      if (0 == (i & 0x1)) {
        for (int j = (27); j > -1; j--) {
          if (ha[j]) {
            ans[xinpos] = 'a' + j;
            ha[j]--;
            break;
          }
        }
      } else {
        for (int j = (0); j < 27; j++) {
          if (hb[j]) {
            ans[xinpos] = 'a' + j;
            hb[j]--;
            break;
          }
        }
      }
    }
  }
  cout << ans;
  return 0;
}
