#include <iostream>
#include <cstring>

using namespace std;

int main() 
{
	string slovo;
	int x, y;
	char a, b;
	cin >> slovo;
	a = slovo[0];
	b = slovo[1];
	cin >> x >> y;
	
	if( x >= y && x != 0 && y != 0) {
		for(int i = 0, j = 0; i < x, j < y; i++, j++) {
			cout << a << b;
		}
	}
	else {
		cout << "nemoguce";
	}
}