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;
long long mod = 1e9 + 7;
long long INF = 1e7;
double EPS = 1e-12;
double tick() {
  static clock_t oldt;
  clock_t newt = clock();
  double diff = 1.0 * (newt - oldt) / CLOCKS_PER_SEC;
  oldt = newt;
  return diff;
}
long long int powP(long long int a, long long int b) {
  if (b == 0) return 1 % mod;
  long long int k;
  k = powP(a, b / 2);
  k = k * k % mod;
  if (b % 2 == 0)
    return k;
  else
    return a * k % mod;
}
bool bitSet(long long int n, long long int i) {
  if ((n & (1LL << i)) != 0)
    return true;
  else
    return false;
}
long long int findGcd(long long int a, long long int b) {
  if (a == 0)
    return b;
  else
    return findGcd(b % a, a);
}
long long int A[500010], B[500010];
int main() {
  long long int T, i, m, n, p, j, l, e, r, b, c, k, q, a, d, w, x, y, v, z, t,
      curr, prev, sum, ans, pos, val, countA, indicator;
  string A, B, S;
  cin >> A >> B;
  n = A.size();
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  S = A;
  long long int st = 0, en = n - 1;
  j = 0;
  k = n - 1;
  long long int turn = 0;
  while (st <= en) {
    if (turn & 1) {
      if (A[j] <= B[k] || (n % 2 == 0 && !(n > 1 && B[k] == B[k - 1]))) {
        S[st] = B[k];
        st++;
      } else {
        S[en] = B[k];
        en--;
      }
      k--;
    } else {
      if (A[j] <= B[k] || (n % 2 == 1 && !(n > 1 && A[j] == A[j + 1]))) {
        S[st] = A[j];
        st++;
      } else {
        S[en] = A[j];
        en--;
      }
      j++;
    }
    turn++;
  }
  cout << S << endl;
  return 0;
}
