Puzzle solver and generator.