I tried for every possible words and numbers of words in the file and ALWAYS it gives the correct result. :(