#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int main() {
	int x,y,i = 0,z = 0;
	char a[2];
	scanf("%c%c",&a[0],&a[1]);
	scanf("%d %d",&x,&y);
	i = x + y;
	if ((abs(x-y)) > 1) { printf("nemoguce"); return 1; }
	while (z!=i) {
		printf ("%c%c",a[0],a[1]);
		z+=2;
	}
    return 0;
}