problem 29 solution