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