Program to parse a string, and output each word in the
ascending order of length