another version of chessboard coloring alg was implemented: without allocating memory for matrix