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