def solve(string):

    n, *a = list(map(int, string.split()))

    e = [sum(a[1::2]), sum(a[2::2])]

    s = a[0] + sum(e)

    ans = []

    for i in range(n):

        ans.append(str(s - e[i % 2] * 2))

        if i < n - 1:

            e[i % 2] += a[i] - a[i + 1]

    return " ".join(ans)





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

def solve(string):

    n, *a = list(map(int, string.split()))

    ans = [sum(a) - 2 * sum(a[1::2])]

    for i in range(n - 1):

        ans.append(2 * a[i] - ans[-1])

    return " ".join(map(str, ans))





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

def solve(string):
    n, *a = list(map(int, string.split()))
    e = [sum(a[1::2]), sum(a[2::2])]
    s = a[0] + sum(e)
    ans = []
    for i in range(n):
        ans.append(str(s - e[i % 2] * 2))
        if i < n - 1:
            e[i % 2] += a[i] - a[i + 1]
    return " ".join(ans)


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

def solve(string):
    n, *a = list(map(int, string.split()))
    ans = [sum(a) - 2 * sum(a[1::2])]
    for i in range(n - 1):
        ans.append(2 * a[i] - ans[-1])
    return " ".join(map(str, ans))


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

-    e = [sum(a[1::2]), sum(a[2::2])] -    s = a[0] + sum(e) -    ans = [] -    for i in range(n): -        ans.append(str(s - e[i % 2] * 2)) -        if i < n - 1: -            e[i % 2] += a[i] - a[i + 1] -    return " ".join(ans) +    ans = [sum(a) - 2 * sum(a[1::2])] +    for i in range(n - 1): +        ans.append(2 * a[i] - ans[-1]) +    return " ".join(map(str, ans))