#include <bits/stdc++.h>

using namespace std;

int main()
{
	int a,b;
	string s;
	cin>>s>>a>>b;
	if(abs(a-b)<2)
	{
		for(int i=0;i<a+b;i++)
		{
			if(i%2==0)cout<<s[b>a];
			else cout<<s[b<=a];
		}
		cout<<endl;
	}
	else cout<<"nemoguce"<<endl;
}