#code to check if a sudoku puzzle is valid