Chaos Sudoku

The environment enables the user to typeset Chaos Sudoku logic puzzles
Fill the cells of an area with numbers from 1 to N of the N*N grid.
Each number can appear only once - in each area, column, row or
diagonal if indicated. Here’s a little self-explanatory example: