the code for loopy puzzlers