N = int(eval(input()))

As = list(map(int, input().split()))



sumA = sum(As)



ys = [0]*N

for i in range(1, N):

    ys[i] = As[i-1]-ys[i-1]



sumY = sum(ys)



z = sumA-sumY

#print(z)

#print(ys)

x = z - sumY



for i in range(N):

    ys[i] *= 2

    if i%2:

        ys[i] -= x

    else:

        ys[i] += x



print((' '.join(map(str, ys))))

N = int(eval(input()))

As = list(map(int, input().split()))



sumA = sum(As)

sumOdd = sum(As[::2])



B = 2*sumOdd - sumA

Bs = [B]

for A in As[:-1]:

    B = 2*A - B

    Bs.append(B)



print((' '.join(map(str, Bs))))

N = int(eval(input()))
As = list(map(int, input().split()))
sumA = sum(As)
ys = [0] * N
for i in range(1, N):
    ys[i] = As[i - 1] - ys[i - 1]
sumY = sum(ys)
z = sumA - sumY
# print(z)
# print(ys)
x = z - sumY
for i in range(N):
    ys[i] *= 2
    if i % 2:
        ys[i] -= x
    else:
        ys[i] += x
print((" ".join(map(str, ys))))

N = int(eval(input()))
As = list(map(int, input().split()))
sumA = sum(As)
sumOdd = sum(As[::2])
B = 2 * sumOdd - sumA
Bs = [B]
for A in As[:-1]:
    B = 2 * A - B
    Bs.append(B)
print((" ".join(map(str, Bs))))

-ys = [0] * N -for i in range(1, N): -    ys[i] = As[i - 1] - ys[i - 1] -sumY = sum(ys) -z = sumA - sumY -# print(z) -# print(ys) -x = z - sumY -for i in range(N): -    ys[i] *= 2 -    if i % 2: -        ys[i] -= x -    else: -        ys[i] += x -print((" ".join(map(str, ys)))) +sumOdd = sum(As[::2]) +B = 2 * sumOdd - sumA +Bs = [B] +for A in As[:-1]: +    B = 2 * A - B +    Bs.append(B) +print((" ".join(map(str, Bs))))