Scripts for solving and generating Einstein's Riddle-type puzzles