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 int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
const long long MOD = 1e9 + 7;
const long long INF = 1e9;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  vector<int> p1(26), p2(26);
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) p1[s[i] - 'a']++;
  cin >> s;
  for (int i = 0; i < s.length(); i++) p2[s[i] - 'a']++;
  if (s.length() % 2 == 0) {
    int tn = s.length() / 2;
    for (int i = 26 - 1; i >= 0; i--)
      while (p1[i] && tn) p1[i]--, tn--;
    tn = s.length() / 2;
    for (int i = 0; i < 26; i++)
      while (p2[i] && tn) p2[i]--, tn--;
  }
  if (s.length() % 2 == 1) {
    int tn = s.length() / 2;
    for (int i = 26 - 1; i >= 0; i--)
      while (p1[i] && tn) p1[i]--, tn--;
    tn = s.length() - s.length() / 2;
    for (int i = 0; i < 26; i++)
      while (p2[i] && tn) p2[i]--, tn--;
  }
  bool p1t = true;
  deque<char> a, b;
  for (int i = 0; i < s.length(); i++) {
    bool played = false;
    int sml = 0, big = 25;
    if (p1t) {
      while (!p1[sml]) sml++;
      while (!p1[big]) big--;
      for (int j = sml + 1; j < 26; j++)
        if (p2[j]) {
          a.push_back(sml + 'a');
          p1[sml]--;
          played = true;
          break;
        }
      if (!played) b.push_front(big + 'a'), p1[big]--;
    } else {
      while (!p2[sml]) sml++;
      while (!p2[big]) big--;
      for (int j = big - 1; j >= 0; j--)
        if (p1[j]) {
          a.push_back(big + 'a');
          p2[big]--;
          played = true;
          break;
        }
      if (!played) b.push_front(sml + 'a'), p2[sml]--;
    }
    p1t = !p1t;
  }
  for (int i = 0; i < a.size(); i++) cout << a[i];
  for (int i = 0; i < b.size(); i++) cout << b[i];
  cout << endl;
}
