Exercise solution.