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;
template <class T>
bool remin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool remax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int nxt() {
  int first;
  scanf("%" PRId32, &first);
  return first;
}
long long nxtll() {
  long long first;
  scanf("%" PRId64, &first);
  return first;
}
long long gcd(long long a, long long b) {
  a = abs(a);
  b = abs(b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct Q {
  long long n, d;
  Q(long long a = 0) : n(a), d(1) {}
  Q(long long nn, long long dd) : n(nn), d(dd) { norm(); }
  void norm() {
    long long g = gcd(abs(n), abs(d));
    n /= g;
    d /= g;
    if (d < 0) {
      n *= -1;
      d *= -1;
    }
  }
  Q operator+(const Q &r) const { return Q(n * r.d + d * r.n, d * r.d); }
  Q operator-(const Q &r) const { return Q(n * r.d - d * r.n, d * r.d); }
  Q operator*(const Q &r) const { return Q(n * r.n, d * r.d); }
  Q operator/(const Q &r) const { return Q(n * r.d, d * r.n); }
  long long value(const Q &r) const { return n * r.d - d * r.n; }
  double vald(const Q &r) const { return n * 1.0 * r.d - d * 1.0 * r.n; }
  bool operator<(const Q &r) const {
    double vv = vald(r);
    if (vv < -1e10) {
      return true;
    }
    if (vv > 1e10) {
      return false;
    }
    return value(r) < 0;
  }
  bool operator>(const Q &r) const {
    double vv = vald(r);
    if (vv < -1e10) {
      return false;
    }
    if (vv > 1e10) {
      return true;
    }
    return value(r) > 0;
  }
  bool operator!=(const Q &r) const { return !(*this == r); }
  bool operator>=(const Q &r) const { return *this > r || *this == r; }
  bool operator<=(const Q &r) const { return *this < r || *this == r; }
  bool operator==(const Q &r) const {
    double vv = vald(r);
    if (vv < -1e10) {
      return false;
    }
    if (vv > 1e10) {
      return false;
    }
    return value(r) == 0;
  }
  double getValue() const { return n / (double)d; }
};
ostream &operator<<(ostream &os, const Q &p) { return os << p.n << "/" << p.d; }
struct pt {
  double first, second;
  pt() = default;
  pt(long double first, long double second) : first(first), second(second) {}
  inline pt operator-(const pt &r) const {
    return pt(first - r.first, second - r.second);
  }
  inline pt operator+(const pt &r) const {
    return pt(first + r.first, second + r.second);
  }
  inline pt operator*(const long double &r) const {
    return pt(first * r, second * r);
  }
  inline pt operator-() const { return pt(-first, -second); }
  inline long double sqlen() const {
    return fabsl(first * first + second * second);
  }
};
ostream &operator<<(ostream &os, const pt &p) {
  return os << "(" << p.first << "," << p.second << ")";
}
ostream &operator<<(ostream &os, const pair<long long, long long> &p) {
  return os << "(" << p.first << "," << p.second << ")";
}
pair<long long, long long> operator-(const pair<long long, long long> &l,
                                     const pair<long long, long long> &r) {
  return pair<long long, long long>(l.first - r.first, l.second - r.second);
}
pair<long long, long long> operator+(const pair<long long, long long> &l,
                                     const pair<long long, long long> &r) {
  return pair<long long, long long>(l.first + r.first, l.second + r.second);
}
inline double cross(const pt &l, const pt &r) {
  return l.first * r.second - l.second * r.first;
}
inline double dot(const pt &l, const pt &r) {
  return l.first * r.first + l.second * r.second;
}
inline long long cross(const pair<long long, long long> &l,
                       const pair<long long, long long> &r) {
  return l.first * r.second - l.second * r.first;
}
inline long long dot(const pair<long long, long long> &l,
                     const pair<long long, long long> &r) {
  return l.first * r.first + l.second * r.second;
}
long long pwmod(long long a, long long n, long long mod) {
  long long ret = 1;
  while (n) {
    if (n & 1) ret = ret * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return ret;
}
template <typename T>
inline T sqr(T first) {
  return first * first;
}
inline bool is_prime(unsigned long long first) {
  for (unsigned long long i = 2; i * i <= first; ++i) {
    if (first % i == 0) {
      return false;
    }
  }
  return true;
}
bool is_sq(long long first) {
  for (long long i = 1; i * i <= first; ++i) {
    if (i * i == first) return true;
  }
  return false;
}
const int N = 300 * 1000 + 10;
char a[N];
char b[N];
char s[N];
void solve() {
  scanf("%s", a);
  scanf("%s", b);
  int n = (int)strlen(a);
  sort(a, a + n);
  sort(b, b + n);
  int l = 0, r = n - 1;
  int L = 0, R = n;
  while (L < R) {
    if (L + 1 < R) {
      if (a[l] < b[r]) {
        s[L] = a[l];
        s[L + 1] = b[r];
        ++l;
        --r;
        L += 2;
      } else {
        for (int i = R - 1; i >= L; i -= 2) {
          s[i] = a[l++];
        }
        for (int i = L + (s[L] != 0); i < R; i += 2) {
          s[i] = b[r--];
        }
        L = R;
      }
    } else {
      s[L] = a[l];
      ++L;
      ++l;
    }
  }
  cout << s << "\n";
}
void prepare() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  prepare();
  int t = 1;
  for (int i = 0; i < (int)(t); i++) {
    solve();
  }
  cerr << "Time " << clock() / (double)CLOCKS_PER_SEC << endl;
  return 0;
}
