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

print((C, A, B))

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

print((Z, X, Y))

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

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

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