Finishing Sudoku grid in Python