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

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	
	char s[2];
	
	char c1 = s[0];
	
	char c2 = s[1];
	
	int b1, b2, i;
	
	int a1 = b1;
	
	int a2 = b2;
	
	gets(s);
	
	scanf("%d %d", &b1, &b2);
	
	int d = 0;
	
	int s1[b1], s2[b2];
	
	
	d = 0;
	
	if(b1 - b2 != 1 && b1 - b2 != 0 && b1 - b2 != -1){

        printf("Nemoguce");
	}
	
	d = 0;
	
	if(b1 - b2 == 0 && b1 - b2 != -1 || b1 - b2 == 1 ){
		for(i = 0; i < 50001; i++){
			
			if(d < b1)
			printf("%c", s[0]);
			
			if(d < b2)
			printf("%c", s[1]);
			
			d++;
		}
	}
	
	d = 0;
	
	if(b1 - b2 == -1){ 
		for(i = 0; i < 50001; i++){
			
			if(d < b2)
			printf("%c", s[1]);
			
			if(d < b1)
			printf("%c", s[0]);
			
			d++;
		}
	}
	
	
	
	
	return 0;
}