N = int(input()) y = list(map(int,input().split())) s = sum(y) ans = [] for e in y: ans += [s-(N-1)*e] print(*ans)