Solution for p46.
Solution for p47.