Prints either vertical or horizontal histogram of the frequencies of word lengths in a specified text file.