sudoku to matrix beta