construction of the initial matrix
Begin the script