solve problem 29