#include <bits/stdc++.h>
using namespace std;
string str(const string& s, const string& t) {
string result;
size_t si = 0, ti = 0;
while (si < s.length() && ti < t.length()) {
if (s[si] < t[ti]) {
result += s[si];
++si;
} else {
result += t[ti];
++ti;
}
}
while (si < s.length()) {
result += s[si];
++si;
}
while (ti < t.length()) {
result += t[ti];
++ti;
}
return result;
}
int main() {
string s, t;
cin >> s >> t;
string answer = str(s, t);
cout << answer << endl;
return 0;
}