Sudoku solver in Python