Solved problem 39