It thoroughly puzzled me for a long while, but I figured out a really inelegant way of completing the last test: counting words of each length in a file