Solved problem 18