#include <iostream>
#include <string>

using namespace std;

int main()
{
	string x, y;
	cin >> x >> y;

	int a = x.length();
	int b = y.length();

	string s = "";
	
	int j = 0;
	if (a > b)
	{
		for (int i = 0; i < a; i++)
		{
			if (i < a - b) { s += x[i]; }
			else 
			{
				s += max(x[i], y[j]); 
				if (x[i] == y[j]) { s += x[i]; }
				j++;
			}
		}
	}
	else
	{
		for (int i = 0; i < b; i++)
		{
			if (i < b - a) { s += y[i]; }
			else
			{
				s += max(x[j], y[i]);
				if (x[j] == y[i]) { s += x[j]; }
				j++;
			}
		}
	}

	cout << s;

	return 0;
}