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;
int n, x, y, a[26] = {0}, b[26] = {0};
string s, t, ans;
void cut() {
  int tmp = 0;
  for (int i = 0; i < 26; tmp += a[i++])
    if (tmp + a[i] >= x) {
      a[i] = x - tmp;
      for (int j = i + 1; j < 26; ++j) a[j] = 0;
      break;
    }
  tmp = 0;
  for (int i = 25; i >= 0; tmp += b[i--])
    if (tmp + b[i] >= y) {
      b[i] = y - tmp;
      for (int j = i - 1; j >= 0; --j) b[j] = 0;
      break;
    }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> s >> t;
  n = s.size();
  for (int i = 0; i < n; ++i) ++a[s[i] - 'a'];
  for (int i = 0; i < n; ++i) ++b[t[i] - 'a'];
  x = (n + 1) / 2;
  y = n / 2;
  cut();
  for (int p = 0, q = 25; n > 1; n -= 2) {
    while (!a[p]) ++p;
    while (!b[q]) --q;
    if (p <= q) {
      ans += char('a' + p);
      --a[p];
      while (!a[p]) ++p;
      if (p > q) {
        --n;
        if (n & 1) {
          for (; n > 1; n -= 2) {
            while (!a[p]) ++p;
            while (!b[q]) --q;
            ans += char('a' + q);
            ans += char('a' + p);
            --a[p];
            --b[q];
          }
          while (!b[q]) --q;
          ans += char('a' + q);
        } else {
          for (; n > 1; n -= 2) {
            while (!a[p]) ++p;
            while (!b[q]) --q;
            ans += char('a' + p);
            ans += char('a' + q);
            --a[p];
            --b[q];
          }
        }
        cout << ans << endl;
        return 0;
      }
      ans += char('a' + q);
      --b[q];
    } else {
      if (n & 1) {
        for (; n > 1; n -= 2) {
          while (!a[p]) ++p;
          while (!b[q]) --q;
          ans += char('a' + p);
          ans += char('a' + q);
          --a[p];
          --b[q];
        }
        while (!a[p]) ++p;
        ans += char('a' + p);
      } else {
        for (; n > 1; n -= 2) {
          while (!a[p]) ++p;
          while (!b[q]) --q;
          ans += char('a' + q);
          ans += char('a' + p);
          --a[p];
          --b[q];
        }
      }
      cout << ans << endl;
      return 0;
    }
  }
  if (n & 1)
    for (int i = 0; i < 26; ++i)
      if (a[i]) {
        ans += char('a' + i);
        break;
      }
  cout << ans << endl;
  return 0;
}
