Add solution to problem 59.