problem 39