def PrintMatrix(mat):
    for x in mat:
        print(" ".join(map(str, x)))