Sudoku python implementation for group C2