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

ans = (Z,X,Y)



#print(ans)

print(*ans,sep=' ')

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

print((Z,X,Y))
X, Y, Z = map(int, input().split())
ans = (Z, X, Y)
# print(ans)
print(*ans, sep=" ")

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

-X, Y, Z = map(int, input().split()) -ans = (Z, X, Y) -# print(ans) -print(*ans, sep=" ") +X, Y, Z = list(map(int, input().split())) +print((Z, X, Y))