in reply to Re^2: Solving the puzzle
in thread Solving the puzzle

I think you mean the script written by me. Read the replies for a fixed version. Note that the point of that thread was not to give the simplest, fastest or cleanest solution.