Warning: there are errors in the posted solutions in some places. Rather than rescan it all in, I made corrections in my own copy, so if you have questions about a particular answer, just come see me.