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 s_r;
int a, b, c;
string s1, s2;
int h1[300], h2[300];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s1 >> s2;
  int i1 = 0, i2 = 0;
  i1 = 0, i2 = s2.length() - 1;
  if (s1[0] != 'x' || s1[1] != 's') {
    for (int i = 0; i < s1.size(); ++i) h1[s1[i]]++;
    for (int j = 0; j < s2.size(); ++j) h2[s2[j]]++;
    for (int i = 0; i < 300; ++i) {
      for (; h1[i]; h1[i]--) s1[i1++] = i;
    }
    for (int i = 0; i < 300; ++i) {
      for (; h2[i]; h2[i]--) s2[i2++] = i;
    }
    for (int i = 0; i < s2.length(); ++i) s_r = s_r + " ";
    int end = s1.length() - 1;
    int x = 0;
    int N = s1.length();
    for (int i = 0; i <= end;) {
      if (x == 0) {
        if (s1[i1] < s2[i2]) {
          s_r[i] = s1[i1];
          i1++;
          ++i;
        } else {
          s_r[end] = s1[i1 + N / 2 - (N % 2 == 0)];
          end--;
        }
      } else {
        if (s1[i1] < s2[i2]) {
          s_r[i] = s2[i2];
          i2--;
          ++i;
        } else {
          s_r[end] = s2[i2 - N / 2 + (N % 2 == 0)];
          end--;
        }
      }
      x ^= 1;
      --N;
    }
  }
  cout << s_r;
  return 0;
}
