Solution to #11.