n = int(input()) ys = list(map(lambda x:int(x), input().split())) size = len(ys) for i in range(size): c0 = (0 + i)%size c1 = (1 + i)%size c2 = (-1 + i)%size print(- ys[c0] + ys[c2] + ys[c1], end=" ") print()