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;
typedef class node {
 public:
  node(int xx) : x(xx) {}
  int x;
  bool operator<(const node &a) const { return x > a.x; }

 private:
} nod;
priority_queue<int> q;
bool cmp(int x, int y) { return x > y; }
vector<char> a;
vector<char> b;
string s;
string re;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    a.push_back(s[i]);
  }
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    b.push_back(s[i]);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end(), cmp);
  for (int i = 0; i < s.size(); i++) {
    re += (char)a[i];
    if (re.size() >= s.size()) break;
    re += (char)b[i];
    if (re.size() >= s.size()) break;
  }
  re += '\0';
  cout << re << endl;
  return 0;
}
