#include <bits/stdc++.h>
using namespace std;

string x, y;
string result;

int main()
{
	cin >> x;
	cin >> y;
	for (int i = 1; i <= max(x.size(), y.size()); ++i)
	{
		if (i <= x.size() && i <= y.size())
		{
			if (x[x.size()-i] > y[y.size()-i])
			{
				result.push_back(x[x.size()-i]);
			}
			else if (x[x.size()-i] < y[y.size()-i])
			{
				result.push_back(y[y.size()-i]);
			}
			else
			{
				result.push_back(x[x.size()-i]);
				result.push_back(y[y.size()-i]);
			}
		}
		else if (i <= x.size())
		{
			result.push_back(x[x.size()-i]);
		}
		else if (i <= y.size())
		{
			result.push_back(y[y.size()-i]);
		}
	}

	for (int i = result.size()-1; i >= 0; --i)
	{
		cout << result[i];
	}



	return 0;
}