[sudoku] write code for valid sudoku