def PrintMatrix(mat): for i in mat: print(' '.join(map(str, i)))