def PrintMatrix(mat): for i in range(len(mat)): print (*mat[i], sep=' ')