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 MOD = 1000000007;
void sync_stdio() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
}
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
void go(string &s1, string &s2, string &ans, int last, int n) {
  string c;
  for (int i = (last); i < (n); ++i) {
    if (i % 2 == 0) {
      c.push_back(s1.back());
      s1.pop_back();
    } else {
      c.push_back(s2.back());
      s2.pop_back();
    }
  }
  reverse(c.begin(), c.end());
  for (int i = (n - 1); i > (last - 1); --i) {
    ans[i] = c.back();
    c.pop_back();
  }
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  reverse(s1.begin(), s1.end());
  int n = s1.size();
  string ans(n, '*');
  for (int i = (0); i < (n); ++i) {
    auto pos1 = s1.back();
    auto pos2 = s2.back();
    if (pos1 < pos2) {
      if (i % 2 == 0) {
        ans[i] = pos1;
        s1.pop_back();
      } else {
        ans[i] = pos2;
        s2.pop_back();
      }
    } else {
      go(s1, s2, ans, i, n);
      break;
    }
  }
  cout << ans;
  return 0;
}
