adding my still-very-messy attempt at solving the penmen problem Jessica posed