A, B, C = list(map(int,input().split()))

(A, B) = (B, A)

(A, C) = (C, A)

print((A, B, C))
X, Y, Z = list(map(int,input().split()))

X, Y = Y, X

X, Z = Z, X

print((X,Y,Z))
A, B, C = list(map(int, input().split()))
(A, B) = (B, A)
(A, C) = (C, A)
print((A, B, C))

X, Y, Z = list(map(int, input().split()))
X, Y = Y, X
X, Z = Z, X
print((X, Y, Z))

-A, B, C = list(map(int, input().split())) -(A, B) = (B, A) -(A, C) = (C, A) -print((A, B, C)) +X, Y, Z = list(map(int, input().split())) +X, Y = Y, X +X, Z = Z, X +print((X, Y, Z))