The core logic was terrifyingly straightforward:

: