a = int(input())
b = int(input())
c = int(input())
a = a + b
b = a - b
a = a - b
b = b + c
c = b - c
b = b -c
print(a,b,c)
a = int(input())
b = int(input())
c = int(input())
a = a + b
b = a - b
a = a - b
b = b + c
c = b - c
b = b -c
print(a,b,c)