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 fast_pow(long long base, long long n, long long M) {
  if (n == 0) return 1;
  if (n == 1) return base;
  long long halfn = fast_pow(base, n / 2, M);
  if (n % 2 == 0)
    return (halfn * halfn) % M;
  else
    return (((halfn * halfn) % M) * base) % M;
}
long long cof(long long n) {
  long long co = 0;
  for (long long i = 1; i <= n; i++) {
    if (n % i == 0) co++;
  }
  return co;
}
vector<long long> pr;
long long pm[1001] = {0};
void SieveOfEratosthenes(long long n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) {
      pr.push_back(p);
      pm[p]++;
    }
}
void quickly_quickly_kro() {
  string a, c;
  cin >> a >> c;
  sort(a.begin(), a.end());
  sort(c.begin(), c.end());
  string b = c;
  for (long long i = 0; i < b.size(); i++) {
    b[i] = c[b.size() - 1 - i];
  }
  for (long long i = 0; i < a.size(); i++) c[i] = '?';
  long long d = 0, e = 0, flag = 0, n = a.size();
  long long l = n - 1, co = 0;
  for (long long i = 0; i < a.size(); i++) {
    if (i % 2 == 0) {
      if ((a[d] < b[e]) && (flag == 0)) {
        if (c[i] == '?') {
          c[i] = a[d];
          d++;
          co++;
        }
      } else {
        flag = 1;
        break;
      }
    } else {
      if ((a[d] < b[e]) && (flag == 0)) {
        if (c[i] == '?') {
          co++;
          c[i] = b[e];
          e++;
        }
      } else {
        break;
      }
    }
  }
  long long d1 = (n + 1) / 2 - 1, e1 = n / 2 - 1;
  for (long long i = a.size() - 1; i >= 0; i--) {
    if (c[i] != '?') break;
    if (co % 2 == 1) {
      c[i] = b[e1];
      e1--;
      co++;
    } else {
      c[i] = a[d1];
      d1--;
      co++;
    }
  }
  cout << c;
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  SieveOfEratosthenes(1001);
  long long t;
  t = 1;
  long long j = 1;
  while (t--) {
    quickly_quickly_kro();
    cout << endl;
    j++;
  }
  return 0;
}
