Add solutions for Exercise 6.