Initial commit of the solution from the book.