you will create only 4 files, but count of various stocks in input.txt can be more than 4