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 N = 300000 + 50;
const int A = 26;
int f[2][A];
char build[N];
string a, b;
inline int get_smallest(int id) {
  for (int i = 0; i < A; i++) {
    if (f[id][i] > 0) {
      return i;
    }
  }
  return 0;
}
inline int get_largest(int id) {
  for (int i = A - 1; i >= 0; i--) {
    if (f[id][i] > 0) {
      return i;
    }
  }
  return 0;
}
inline string findFirst(int k) {
  string use = "";
  for (int i = 0; i < A; i++) {
    for (int j = 1; j <= f[0][i]; j++) {
      if (use.size() == k) {
        break;
      }
      use += i + 'a';
    }
  }
  reverse(use.begin(), use.end());
  return use;
}
inline string findSecond(int k) {
  string use = "";
  for (int i = A - 1; i >= 0; i--) {
    for (int j = 1; j <= f[1][i]; j++) {
      if (use.size() == k) {
        break;
      }
      use += i + 'a';
    }
  }
  reverse(use.begin(), use.end());
  return use;
}
int main() {
  ios ::sync_with_stdio(false);
  cin >> a >> b;
  int n = (int)a.size();
  for (int i = 0; i < n; i++) {
    f[0][a[i] - 'a']++;
  }
  for (int i = 0; i < n; i++) {
    f[1][b[i] - 'a']++;
  }
  int pref = 1, suff = n;
  int myptr = 0, opptr = 0;
  string my = findFirst((n + 1) / 2);
  string opp = findSecond(n / 2);
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      if (my.back() < opp.back()) {
        build[pref++] = my.back();
        my.pop_back();
      } else {
        build[suff--] = my[myptr++];
      }
    } else {
      if (opp.back() > my.back()) {
        build[pref++] = opp.back();
        opp.pop_back();
      } else {
        build[suff--] = opp[opptr++];
      }
    }
  }
  string res = "";
  for (int i = 1; i <= n; i++) {
    res += build[i];
  }
  cout << res << "\n";
}
