def PrintMatrix(mat): for i in range(len(mat)): print(" ".join(map(str, mat[i])))