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;
string a, b, ans;
int main() {
  cin >> a >> b;
  int n = a.length();
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  for (int i = 0; i < n; i++) ans += '?';
  int idxa = 0, idxb = 0, idx = n;
  for (int i = 0; i < n; i++) {
    if (a[idxa] > b[idxb]) {
      idx = i;
      break;
    }
    if (i % 2 == 0) {
      ans[i] = a[idxa];
      idxa++;
    } else {
      ans[i] = b[idxb];
      idxb++;
    }
  }
  if (n % 2 == 0)
    idxa = (n - 1) / 2, idxb = (n - 1) / 2;
  else
    idxa = (n - 1) / 2, idxb = (n - 1) / 2 - 1;
  if (idx % 2 == 1) {
    if (n % 2 == 0) {
      for (int i = n - 1; i >= idx; i--) {
        if (i % 2 == 1) {
          ans[i] = a[idxa];
          idxa--;
        } else {
          ans[i] = b[idxb];
          idxb--;
        }
      }
    } else {
      for (int i = n - 1; i >= idx; i--) {
        if (i % 2 == 0) {
          ans[i] = a[idxa];
          idxa--;
        } else {
          ans[i] = b[idxb];
          idxb--;
        }
      }
    }
  } else {
    if (n % 2 == 0) {
      for (int i = n - 1; i >= idx; i--) {
        if (i % 2 == 0) {
          ans[i] = a[idxa];
          idxa--;
        } else {
          ans[i] = b[idxb];
          idxb--;
        }
      }
    } else {
      for (int i = n - 1; i >= idx; i--) {
        if (i % 2 == 1) {
          ans[i] = a[idxa];
          idxa--;
        } else {
          ans[i] = b[idxb];
          idxb--;
        }
      }
    }
  }
  cout << ans << endl;
}
