Solved valid sudoku problem.