def PrintMatrix(mat):
    for row in mat:
        print(" ".join(row))