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

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

X,Y=Y,X

X,Z=Z,X

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

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

-print((Z, X, Y)) +X, Y = Y, X +X, Z = Z, X +print((X, Y, Z))