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 double eps = 1e-7;
const int INF = 0x3f3f3f3f;
const int MAX_N = (int)3e5 + 17;
const int mod = (int)1e9 + 7 + eps;
int N, M, S, T, K, tp, bk;
int a[MAX_N], vis[MAX_N];
vector<int> v[MAX_N];
void debug(int nCount, ...) {
  va_list argptr;
  va_start(argptr, nCount);
  cout << "debug:";
  for (int i = 0; i < nCount; i++) cout << " " << va_arg(argptr, int);
  putchar('\n');
  va_end(argptr);
}
int main() {
  int kase = 1;
  char s1[MAX_N], s2[MAX_N], s3[MAX_N], s4[MAX_N];
  while (~scanf("%s %s", s1, s2)) {
    int len = strlen(s1);
    memset(s3, 0, len + 1);
    memset(s4, 0, len + 1);
    sort(s1, s1 + len);
    sort(s2, s2 + len);
    int t1 = 0, t2 = len - 1;
    for (int i = 0; i < len; i++) {
      if (i % 2 == 0) {
        s3[i] = s1[t1];
        t1++;
      } else {
        s3[i] = s2[t2];
        t2--;
      }
    }
    t1 = 0;
    t2 = len - 1;
    for (int i = 0; i < len; i++) {
      if (i % 2 == 0) {
        s4[i] = s2[t2];
        t2--;
      } else {
        s4[i] = s1[t1];
        t1++;
      }
    }
    if (strcmp(s3, s4) <= 0) {
      puts(s3);
    } else {
      puts(s4);
    }
  }
  return 0;
}
