MOD = 10 ** 9 + 7 INF = 10 ** 10 import sys sys.setrecursionlimit(100000000) dy = (-1,0,1,0) dx = (0,1,0,-1) from collections import deque def main(): n = int(input()) Y = list(map(int,input().split())) if n == 2: print(Y[1],Y[0]) return x = sum(Y) X = [x] * n for i in range(n): X[i] -= (n - 1) * Y[i] print(*X) if __name__ =='__main__': main()