Solve exercise 10