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;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
int cas = 1;
int dxx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dyy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
int main() {
  string s1, s2, ans;
  int i, j, k, l;
  cin >> s1 >> s2;
  sort(s1.begin(), s1.end());
  sort(s2.begin(), s2.end());
  reverse(s2.begin(), s2.end());
  int n = s1.size();
  for (i = 0; i < n; i++) {
    if (i % 2 == 0)
      ans += s1[i / 2];
    else
      ans += s2[i / 2];
  }
  string a, a1;
  i = 0;
  j = 0;
  k = 0;
  while (s1[i] <= s2[j] && k < n) {
    if (k % 2 == 0) {
      a1 += s1[i];
      i++;
    } else {
      a1 += s2[j];
      j++;
    }
    k++;
  }
  for (; j < n / 2; j++) {
    a1 += s2[j];
  }
  n++;
  for (; i < n / 2; i++) {
    a1 += s1[i];
  }
  if (ans < a1) a1 = ans;
  cout << a1 << endl;
}
