#include <stdio.h>

main()
{

	char buf[200],*p;
	FILE *fndx,*fin,*fout;
	char title[100],name[100];

	fndx=fopen("INDEX.CLINTON","r");
	while(fgets(buf,200,fndx)!=NULL){
printf("Processing %s\n",buf);
	sscanf(buf,"%s ",name);
	p=index(buf,' ');
	strcpy(title,p);
	fin=fopen(name,"r");
strcat(name,"p");
	fout=fopen(name,"w");
	fprintf(fout,"%s\n",title);
	while(fgets(buf,200,fin)!=NULL){
		fprintf(fout,"%s",buf);
	}
	fclose(fin);
	fclose(fout);
	}
}
		
