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 int dx4[5] = {0, -1, 0, 1, 0};
const int dy4[5] = {0, 0, 1, 0, -1};
const int dx8[9] = {0, -1, 0, 1, 0, 1, 1, -1, -1};
const int dy8[9] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
const int maxn = 1e5 + 5;
const double PI = acos(-1.0);
const long long mod = 1e9 + 7;
long long po(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  } else {
    return gcd(b % a, a);
  }
}
void YES() {
  puts("YES");
  exit(0);
}
void Yes() {
  puts("Yes");
  exit(0);
}
void NO() {
  puts("NO");
  exit(0);
}
void No() {
  puts("No");
  exit(0);
}
void one() {
  puts("-1");
  exit(0);
}
string x, y;
int vis[maxn];
void solve() {
  cin >> x >> y;
  int len = x.length();
  string res = "";
  res.resize(len);
  sort(x.begin(), x.end());
  x = x.substr(0, len / 2 + (len & 1));
  sort(y.begin(), y.end());
  reverse(y.begin(), y.end());
  y = y.substr(0, len / 2);
  int st = 0, last = len - 1;
  int px = 0, py = 0;
  int flag = 0;
  for (int i = 0; i < len; i++) {
    if (i % 2 == 0) {
      if (x[px] < y[py]) {
        res[st] = x[px];
        st++;
        px++;
      } else {
        st = len - 1;
        x = x.substr(px);
        reverse(x.begin(), x.end());
        y = y.substr(py);
        reverse(y.begin(), y.end());
        px = 0, py = 0;
        for (int j = len - 1; j >= i; j--) {
          if (j % 2 == (len - 1) % 2) {
            res[st] = x[px];
            st--;
            px++;
          } else {
            res[st] = y[py];
            st--;
            py++;
          }
        }
        break;
      }
    } else {
      if (x[px] < y[py]) {
        res[st] = y[py];
        st++;
        py++;
      } else {
        x = x.substr(px);
        reverse(x.begin(), x.end());
        y = y.substr(py);
        reverse(y.begin(), y.end());
        st = len - 1;
        px = 0, py = 0;
        for (int j = len - 1; j >= i; j--) {
          if (j % 2 != (len - 1) % 2) {
            res[st] = x[px];
            st--;
            px++;
          } else {
            res[st] = y[py];
            st--;
            py++;
          }
        }
        break;
      }
    }
  }
  cout << res << endl;
}
int main() {
  solve();
  return 0;
}
