Producing all permutations, validating solutions, not yet optimized