This is a script that proves a solution to a riddle that I was inspired to make after being stumped by a friend; with some hopefully helpful comments.
Here's a video to explain the riddle (And the solution): https://youtu.be/N5vJSNXPEwA
There isn't much to do with the script other than change the number of prisoners. If you have a better version or way to do this please fork it and do so! I'd love to see other ways.