#include <iostream>

using namespace std;

int main()
{
	string s = "nemoguce";
	char c1, c2, tc;
	long long int a1, a2, ta;
	cin >> c1 >> c2 >> a1 >> a2;

	if (a1 < a2)
	{
		ta = a1;
		a1 = a2;
		a2 = ta;
		tc = c1;
		c1 = c2;
		c2 = tc;
	}

	if (a1 - a2 > 1)
	{
		cout << s;
		return 0;
	}

	if (a1 - a2 == 1)
		cout << c1;

	for (long long int i = 0; i < a2; i++)
		cout << c2 << c1;
	
	return 0;
}