bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

#include <bits/stdc++.h>
volatile bool isLocalTestEnabled = 0;
bool g_isLocalPrintEnabled = (bool)(0);
template <typename T>
void UpdateMin(T& a, const T b) {
  a = std::min(a, b);
}
template <typename T>
void UpdateMax(T& a, const T b) {
  a = std::max(a, b);
}
const long double Pi = std::atan(1.0L) * 4.0L;
static const long double Eps = 1.0e-09;
template <typename T>
bool IsEqual(const T a, const T b) {
  return std::abs(a - b) < Eps;
}
template <typename T>
bool IsGreater(const T a, const T b) {
  return a > b + Eps;
}
template <typename T>
bool IsLess(const T a, const T b) {
  return a + Eps < b;
}
template <typename T>
bool IsGreaterEqual(const T a, const T b) {
  return !IsLess(a, b);
}
template <typename T>
bool IsLessEqual(const T a, const T b) {
  return !IsGreater(a, b);
}
template <typename T>
std::string ToStr(const T& val) {
  std::ostringstream ostr;
  ostr << val;
  return ostr.str();
}
template <typename T>
bool FromStr(const std::string& str, T& val) {
  std::istringstream istr(str);
  istr >> val;
  return !!istr;
}
template <typename T>
std::istream& operator>>(std::istream& ist, std::vector<T>& data) {
  ;
  for (size_t i = 0; i < data.size(); i++) {
    ist >> data[i];
  }
  return ist;
}
template <typename T>
T Read(std::istream& ist) {
  ;
  T val;
  ist >> val;
  return val;
}
template <typename T>
std::ostream& operator<<(std::ostream& ost, const std::vector<T>& data) {
  for (size_t i = 0; i < data.size(); i++) {
    if (i != 0) {
      ost << ' ';
    }
    ost << data[i];
  }
  return ost;
}
template <size_t id>
class StopWatch {};
bool EverythingIsLessEqual(const std::multiset<char, std::greater<char> >& b2,
                           const char c) {
  if (b2.empty()) return false;
  std::multiset<char, std::greater<char> >::iterator p = b2.begin();
  const char maxChar = *p;
  return maxChar <= c;
}
bool EverythingIsGreaterEqual(const std::multiset<char, std::less<char> >& b1,
                              const char c) {
  if (b1.empty()) return false;
  std::multiset<char, std::less<char> >::iterator p = b1.begin();
  const char minChar = *p;
  return minChar >= c;
}
size_t GetFirst(const std::set<size_t>& s) {
  ;
  std::set<size_t>::iterator p = s.begin();
  return *p;
}
size_t GetLast(const std::set<size_t>& s) {
  ;
  std::set<size_t>::iterator p = s.end();
  --p;
  return *p;
}
void MoveFirst(std::multiset<char, std::less<char> >& b1,
               const std::multiset<char, std::greater<char> >& b2,
               std::set<size_t>& freePos, std::string& ans) {
  ;
  std::multiset<char, std::less<char> >::iterator pMin = b1.begin();
  const char minChar = *pMin;
  if (!EverythingIsLessEqual(b2, minChar)) {
    const size_t p = GetFirst(freePos);
    freePos.erase(p);
    ans[p] = minChar;
    b1.erase(pMin);
  } else {
    std::multiset<char, std::less<char> >::iterator pMax = b1.end();
    --pMax;
    const char maxChar = *pMax;
    const size_t p = GetLast(freePos);
    freePos.erase(p);
    ans[p] = maxChar;
    b1.erase(pMax);
  }
}
void MoveSecond(const std::multiset<char, std::less<char> >& b1,
                std::multiset<char, std::greater<char> >& b2,
                std::set<size_t>& freePos, std::string& ans) {
  ;
  std::multiset<char, std::greater<char> >::iterator pMax = b2.begin();
  const char maxChar = *pMax;
  if (!EverythingIsGreaterEqual(b1, maxChar)) {
    const size_t p = GetFirst(freePos);
    freePos.erase(p);
    ans[p] = maxChar;
    b2.erase(pMax);
  } else {
    std::multiset<char, std::less<char> >::iterator pMin = b2.end();
    --pMin;
    const char minChar = *pMin;
    const size_t p = GetLast(freePos);
    freePos.erase(p);
    ans[p] = minChar;
    b2.erase(pMin);
  }
}
std::string ToString(const std::multiset<char, std::less<char> >& b) {
  std::string s;
  for (auto x = b.begin(); x != b.end(); ++x) {
    s += *x;
  }
  return s;
}
std::string ToString(const std::multiset<char, std::greater<char> >& b) {
  std::string s;
  for (auto x = b.begin(); x != b.end(); ++x) {
    s += *x;
  }
  return s;
}
std::string GetAns(std::string s1, std::string s2) {
  std::sort(s1.begin(), s1.end(), std::less<char>());
  std::sort(s2.begin(), s2.end(), std::greater<char>());
  const size_t n = s1.size();
  const size_t n2 = n / 2;
  const size_t n1 = n - n2;
  s1.resize(n1);
  s2.resize(n2);
  std::multiset<char, std::less<char> > b1(s1.begin(), s1.end());
  std::multiset<char, std::greater<char> > b2(s2.begin(), s2.end());
  std::string ans(n, '?');
  std::set<size_t> freePos;
  for (size_t i = 0; i < n; i++) {
    freePos.insert(i);
  }
  if (!g_isLocalPrintEnabled) {
  } else
    std::cerr << "START: " << ToString(b1) << " vs " << ToString(b2)
              << std::endl;
  for (size_t i = 0; i < n; i++) {
    if (!g_isLocalPrintEnabled) {
    } else
      std::cerr << "STEP: " << std::setw(2) << i << " " << std::setw(n)
                << ToString(b1) << " vs " << std::setw(n) << ToString(b2);
    if (i % 2 == 0) {
      MoveFirst(b1, b2, freePos, ans);
    } else {
      MoveSecond(b1, b2, freePos, ans);
    }
    if (!g_isLocalPrintEnabled) {
    } else
      std::cerr << " -> " << ans << std::endl;
  }
  return ans;
}
bool Solve(std::istream& ist, std::ostream& ost, const bool multipleTestMode) {
  StopWatch<1> sw;
  (void)sw;
  std::string s1, s2;
  ist >> s1 >> s2;
  if (multipleTestMode && !ist) return false;
  if (!g_isLocalPrintEnabled) {
  } else
    std::cerr << std::endl << "Next test: " << s1 << " " << s2 << std::endl;
  const std::string ans = GetAns(s1, s2);
  ost << ans << std::endl;
  return multipleTestMode;
}
void RunSolve(std::istream& ist, std::ostream& ost) { Solve(ist, ost, false); }
int main(int argc, const char* argv[]) {
  std::ios_base::sync_with_stdio(false);
  if (argc > 1) {
    std::ifstream ifs(argv[1]);
    if (!ifs) {
      std::cout << "File not found: " << argv[1] << std::endl;
      return 1;
    }
    RunSolve(ifs, std::cout);
    return 0;
  }
  RunSolve(std::cin, std::cout);
}
