#include<iostream>
#include<string>
using namespace std;
int main()
{
	int a1, a2;
	char c1, c2;
	cin>>c1>>c2;
	cin>>a1;
	cin>>a2;
	if(a1>a2 || a2>a1)
	{
		cout<<"nemoguce"<<endl;
	}
	else {
		for(int i=0; i<(a1+a2)/2; i++)
		{
			cout<<c1<<c2;
		}
	}
}