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

int main(int argc, char const *argv[])
{
	FILE *f;
	f=fopen(argv[1],"r");
	char * buffer = NULL;
	size_t x=0;
	int y=0;
	while((getline(&buffer,&x,f))!=-1) 
	{
		printf("%06d ",y);
		printf("%s",buffer);
		y++;
	}
	fclose(f);
	printf("\n");
}