Adding Solution 12.

Minor style/doco fix otherwise.