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;
double h;
string s, t;
int a[1500], b[1500];
int main() {
  cin >> s >> t;
  for (int i = 0; i < s.size(); i++) a[s[i]]++;
  for (int i = 0; i < t.size(); i++) b[t[i]]++;
  int n = 'a', m = 'z';
  string ans1 = "", ans2 = "";
  for (int i = 0; i < s.size(); i += 2) {
    while (a[n] == 0) n++;
    while (b[m] == 0) m--;
    if (i + 1 == s.size()) {
      printf("%c", n);
      return 0;
    }
    if (n < m)
      ans1 += n, ans2 += m;
    else
      ans1 += m, ans1 += n;
    ans2 += n;
    ans2 += m;
    a[n]--;
    b[m]--;
  }
  cout << min(ans1, ans2);
  return 0;
}
