Solve problem 29