Chapter 9 exercises.

Might be able to do it with index and subst, but that's another chapter.