Added a very slow solution to problem 40