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;
long long INV2 = 500000004;
long long INV6 = 166666668;
long long power(long long a, long long b, long long c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b & 1) x = (x * y) % c;
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
int dx[] = {0, -1, 0, 1};
int dy[] = {-1, 0, 1, 0};
int dr[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dc[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int N = 3e5 + 5;
char a[N], b[N];
int ha[30], hb[30];
char ans[N];
int main() {
  scanf("%s", a), scanf("%s", b);
  int len = strlen(a);
  for (int i = 0; i < len; ++i) {
    ha[a[i] - 'a']++;
  }
  for (int i = 0; i < len; ++i) {
    hb[b[i] - 'a']++;
  }
  int st = 0, en = len - 1, ol, ig;
  for (int i = 0; i < len; ++i) {
    for (int j = 25; j >= 0; --j) {
      if (hb[j]) {
        ig = j;
        break;
      }
    }
    for (int j = 0; j < 26; ++j) {
      if (ha[j]) {
        ol = j;
        break;
      }
    }
    if (i & 1) {
      if (ol >= ig) {
        for (int j = 0; j < 26; ++j) {
          if (hb[j]) {
            ans[en--] = (char)(j + 'a');
            hb[j]--;
            break;
          }
        }
      } else if (ol < ig) {
        hb[ig]--;
        ans[st++] = (char)(ig + 'a');
      }
    } else {
      if (ol >= ig) {
        for (int j = 25; j >= 0; --j) {
          if (ha[j]) {
            ans[en--] = (char)(j + 'a');
            ha[j]--;
            break;
          }
        }
      } else if (ol < ig) {
        ans[st++] = (char)(ol + 'a');
        ha[ol]--;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
