Solution to 79. Requires a bit of pencil-work.