def PrintMatrix(mat):
print('\n'.join(' '.join(str(i) for i in row) for row in mat))