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



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



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

x, y, z = list(map(int, input().split()))
print((z, x, y))

-X, Y, Z = list(map(int, input().split())) -print((Z, X, Y)) +x, y, z = list(map(int, input().split())) +print((z, x, y))