Solved problem 31