#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main()
{
	char c[]="1234567";
	char tmp[100]={"\0"};
	int clen=strlen(c);
	int  n=3;
	int n2=n;
	int n3=n;
	int index=0;
	strncpy(tmp,c,n);
next:
	printf("%s\n",tmp);
	while(n2<clen)
	{
		for(int i=0;i<n3;i++)
		{
			char tmp2=tmp[i];
			tmp[i]=c[n];
			printf("%s\n",tmp);
			tmp[i]=tmp2;
		}
		n2++;
	}
	if((clen-n2)>n3)
	{
		strncpy(tmp,c+n2,n3);
		n2+=n3;
		printf("---------------------\n");
		goto next;
	}
	return 0;

}