Solution to problem 59