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))