Solution to #8.
Add spoiler alert.
Solution #9