Add a solution for Exercise 3.82