n = int(eval(input()))

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

total_odd = sum(aa[1::2])

total_eve = sum(aa[0::2])

tmp = total_eve - total_odd

print(tmp)

for i in range(1,n):

    tmp = 2*aa[i-1] - tmp

    print(tmp)
n = int(eval(input()))

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

total_odd = sum(aa[1::2])

total_eve = sum(aa[0::2])

tmp = total_eve - total_odd

outs = [tmp]

for i in range(1,n):

    tmp = 2*aa[i-1] - tmp

    outs.append(tmp)

print((' '.join(list(map(str,outs)))))
n = int(eval(input()))
aa = list(map(int, input().split()))
total_odd = sum(aa[1::2])
total_eve = sum(aa[0::2])
tmp = total_eve - total_odd
print(tmp)
for i in range(1, n):
    tmp = 2 * aa[i - 1] - tmp
    print(tmp)

n = int(eval(input()))
aa = list(map(int, input().split()))
total_odd = sum(aa[1::2])
total_eve = sum(aa[0::2])
tmp = total_eve - total_odd
outs = [tmp]
for i in range(1, n):
    tmp = 2 * aa[i - 1] - tmp
    outs.append(tmp)
print((" ".join(list(map(str, outs)))))

-print(tmp) +outs = [tmp] -    print(tmp) +    outs.append(tmp) +print((" ".join(list(map(str, outs)))))