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;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 29;
inline int two(int n) { return 1 << n; }
inline int test(int n, int b) { return (n >> b) & 1; }
inline void set_bit(int &n, int b) { n |= two(b); }
inline void unset_bit(int &n, int b) { n &= ~two(b); }
inline int last_bit(int n) { return n & (-n); }
inline int ones(int n) {
  int res = 0;
  while (n && ++res) n -= n & (-n);
  return res;
}
template <class T>
void chmax(T &a, const T &b) {
  a = max(a, b);
}
template <class T>
void chmin(T &a, const T &b) {
  a = min(a, b);
}
void quick_sort(int *a, int n, int *b) {
  int i, j, p, t;
  if (n < 2) {
    return;
  }
  p = a[n / 2];
  for (i = 0, j = n - 1;; i++, j--) {
    while (a[i] < p) {
      i++;
    }
    while (p < a[j]) {
      j--;
    }
    if (i >= j) {
      break;
    }
    t = a[i];
    a[i] = a[j];
    a[j] = t;
    t = b[i];
    b[i] = b[j];
    b[j] = t;
  }
  quick_sort(a, i, b);
  quick_sort(a + i, n - i, b + i);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  long long n = a.size(), i;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  char fin[300005] = {0};
  for (int i = 0; i < (n / 2); i++) {
    char tmp = b[i];
    b[i] = b[n - i - 1];
    b[n - i - 1] = tmp;
  }
  long long flag = 0, ac = (n + 1) / 2;
  long long pnt = 0, pos;
  for (int i = 0; i < (n); i++) {
    if (i % 2 == 0) {
      if (a[i / 2] > b[i / 2]) {
        pos = i;
        flag = 1;
        break;
      } else {
        fin[i] = a[i / 2];
      }
    } else
      fin[i] = b[(i) / 2];
  }
  if (flag) {
    pnt = n - 1;
    long long cur = pos;
    for (i = pos; i < n; i++) {
      if ((i - pos) % 2 == 0) {
        fin[pnt] = a[i / 2];
        pnt--;
      } else {
        fin[cur] = b[i / 2];
        cur++;
      }
    }
  }
  cout << fin;
  return 0;
}
