n = int(input()) y = list(map(int, input().split())) s=sum(y) a = [s-(n-1)*y[i] for i in range(n)] print(*a)