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 long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 300100;
char c[N];
int n;
int kol[2][26];
int mn[2], mx[2];
int kol0, kol1;
vector<char> ans;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  gets(c);
  n = strlen(c);
  for (int i = int(0); i < int(n); ++i) {
    kol[0][c[i] - 'a']++;
  }
  gets(c);
  for (int i = int(0); i < int(n); ++i) {
    kol[1][c[i] - 'a']++;
  };
  ;
  ans.assign(n, 'a');
  kol0 = 0, kol1 = 0;
  for (int i = int(0); i < int(n); ++i) {
    mn[0] = mn[1] = 27;
    mx[0] = mx[1] = -1;
    for (int j = int(0); j < int(26); ++j) {
      for (int k = int(0); k < int(2); ++k) {
        if (kol[k][j]) {
          umx(mx[k], j);
          umn(mn[k], j);
        }
      }
    }
    if (!(i & 1)) {
      if (mn[0] >= mx[1]) {
        ans[n - kol1 - 1] = char('a' + mx[0]);
        kol[0][mx[0]]--;
        kol1++;
      } else {
        ans[kol0] = char('a' + mn[0]);
        kol[0][mn[0]]--;
        kol0++;
      }
    } else {
      if (mn[0] >= mx[1]) {
        ans[n - kol1 - 1] = char('a' + mn[1]);
        kol[1][mn[1]]--;
        kol1++;
      } else {
        ans[kol0] = char('a' + mx[1]);
        kol[1][mx[1]]--;
        kol0++;
      }
    };
  }
  for (int i = int(0); i < int(n); ++i) {
    printf("%c", ans[i]);
  }
  cout << endl;
  return 0;
}
