Adding solution to Exercise 11.