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, t;
int n;
int a[30], b[30];
char result[300005];
int main() {
  cin >> s >> t;
  n = s.size();
  for (int i = 0; i < n; ++i) {
    a[s[i] - 'a']++;
    b[t[i] - 'a']++;
  }
  int num = 0, start = 0, finish = n - 1;
  int turn = 0;
  while (num < n) {
    int pos = -1;
    if (turn == 0) {
      for (int i = 0; i <= (int)('z' - 'a'); ++i) {
        if (a[i] > 0) {
          pos = i;
          break;
        }
      }
      bool check = false;
      for (int i = pos + 1; i <= (int)('z' - 'a'); --i) {
        if (b[i] > 0) {
          check = true;
          break;
        }
      }
      if (!check) {
        for (int i = (int)('z' - 'a'); i >= 0; --i) {
          if (a[i] > 0) {
            pos = i;
            break;
          }
        }
        result[finish] = (char)(pos + 'a');
        finish--;
      } else {
        result[start] = (char)(pos + 'a');
        start++;
      }
      a[pos]--;
    } else {
      for (int i = (int)('z' - 'a'); i >= 0; --i) {
        if (b[i] > 0) {
          pos = i;
          break;
        }
      }
      bool check = false;
      for (int i = 0; i < pos; ++i) {
        if (a[i] > 0) {
          check = true;
          break;
        }
      }
      if (!check) {
        for (int i = 0; i <= (int)('z' - 'a'); ++i) {
          if (b[i] > 0) {
            pos = i;
            break;
          }
        }
        result[finish] = (char)(pos + 'a');
        finish--;
      } else {
        result[start] = (char)(pos + 'a');
        start++;
      }
      b[pos]--;
    }
    num++;
    turn = 1 - turn;
  }
  for (int i = 0; i < n; ++i) {
    cout << result[i];
  }
  return 0;
}
