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 o[26], ig[26];
int main() {
  int n;
  char a[300001], b[300001];
  cin >> a >> b;
  n = strlen(a);
  sort(a, a + n);
  sort(b, b + n);
  if (n % 2 == 0) {
    for (int i = 0; i < n / 2; i++) {
      o[a[i] - 'a']++;
    }
    for (int i = n - 1; i >= n / 2; i--) {
      ig[b[i] - 'a']++;
    }
  } else {
    for (int i = 0; i <= n / 2; i++) {
      o[a[i] - 'a']++;
    }
    for (int i = n - 1; i > n / 2; i--) {
      ig[b[i] - 'a']++;
    }
  }
  string s = "";
  for (int i = 0; i < n; i++) s += '?';
  int left = 0, right = n - 1;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      int ol, igr;
      for (int j = 0; j < 26; j++) {
        if (o[j]) {
          ol = j;
          break;
        }
      }
      for (int j = 25; j >= 0; j--) {
        if (ig[j]) {
          igr = j;
          break;
        }
      }
      if (ol >= igr) {
        for (int j = 25; j >= 0; j--) {
          if (o[j]) {
            o[j]--;
            s[right--] = char(j + 'a');
            break;
          }
        }
      } else {
        s[left++] = char(ol + 'a');
        o[ol]--;
      }
    } else {
      int ol, igr;
      for (int j = 0; j < 26; j++) {
        if (o[j]) {
          ol = j;
          break;
        }
      }
      for (int j = 25; j >= 0; j--) {
        if (ig[j]) {
          igr = j;
          break;
        }
      }
      if (ol < igr) {
        s[left++] = char(igr + 'a');
        ig[igr]--;
      } else {
        for (int j = 0; j < 26; j++) {
          if (ig[j]) {
            s[right--] = char(j + 'a');
            ig[j]--;
            break;
          }
        }
      }
    }
  }
  cout << s;
  return 0;
}
