Final code implementation for SudokuD