Input my solution to the course problem.