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 Maxn = 3e5 + 10;
char s1[Maxn], s2[Maxn], ans[Maxn];
int n, x, num, cnt1[30], cnt2[30], Left, Right, sum;
int u, v;
bool flag;
bool Judge() {
  for (int i = 0; i < 26; i++) {
    if (cnt1[i]) {
      u = i;
      break;
    }
  }
  for (int i = 25; i >= 0; i--) {
    if (cnt2[i]) {
      v = i;
      break;
    }
  }
  return u < v;
}
int main() {
  scanf("%s%s", s1, s2);
  n = strlen(s1);
  memset(cnt1, 0, sizeof(cnt1));
  memset(cnt2, 0, sizeof(cnt2));
  for (int i = 0; i < n; i++) {
    x = s1[i] - 'a', cnt1[x]++;
    x = s2[i] - 'a', cnt2[x]++;
  }
  sum = 0;
  for (int i = 0; i < 26; i++) {
    if (sum + cnt1[i] >= (n + 1) / 2) {
      cnt1[i] = (n + 1) / 2 - sum;
      for (int j = i + 1; j < 26; j++) cnt1[j] = 0;
      break;
    }
    sum = sum + cnt1[i];
  }
  sum = 0;
  for (int i = 25; i >= 0; i--) {
    if (sum + cnt2[i] > n / 2) {
      cnt2[i] = n / 2 - sum;
      for (int j = i - 1; j >= 0; j--) cnt2[j] = 0;
      break;
    }
    sum = sum + cnt2[i];
  }
  num = 0;
  Left = 0, Right = n - 1;
  while (num < n) {
    if (Judge()) {
      for (int i = 0; i < 26; i++) {
        if (cnt1[i]) {
          u = i;
          cnt1[i]--;
          break;
        }
      }
      ans[Left++] = u + 'a';
      num++;
      if (num == n) break;
    } else {
      for (int i = 25; i >= 0; i--) {
        if (cnt1[i]) {
          v = i;
          cnt1[i]--;
          break;
        }
      }
      ans[Right--] = v + 'a';
      num++;
      if (num == n) break;
    }
    if (Judge()) {
      for (int i = 25; i >= 0; i--) {
        if (cnt2[i]) {
          v = i;
          cnt2[i]--;
          break;
        }
      }
      ans[Left++] = v + 'a';
      num++;
      if (num == n) break;
    } else {
      for (int i = 0; i < 26; i++) {
        if (cnt2[i]) {
          u = i;
          cnt2[i]--;
          break;
        }
      }
      ans[Right--] = u + 'a';
      num++;
      if (num == n) break;
    }
  }
  ans[num] = '\0';
  printf("%s\n", ans);
  return 0;
}
