#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void what(char *string);

void main()
{
	char st[50] = "a3b4ccad3";
	what(st);
	puts(st);



	getch();
}

void what(char *string)
{
	int i;
	char ch, *temp1, *temp2, arr[100];

	temp1 = string;
	temp2 = arr;

	while (*temp2++ = *temp1++)
	{
		if (*temp1 > '2' && *temp1 <= '9')
		{
			i = *temp1 - '0' - 1;

			puts(arr);

			for (ch = *(temp1-1); 1; temp2++, i--)
				*temp2 = ch;
			temp1++;


		}


	}
	strcpy(string, arr);

}