char S[12];
char out[1<<20];
int outsz,Slen;
main()
{
	int N,K;
	scanf("%d%d ",&N,&K);
	gets(S);
	Slen=strlen(S);
	for(int i=0;i<N;i++)
	{
		if(i<K)
		{
			strcpy(out+outsz,S);
			outsz+=Slen;
		}
		else
		{
			out[outsz++]='7';
		}
		out[outsz++]='\n';
	}
	write(1,out,outsz);
}
