n = int(input())
List = list(map(int,input().split()))
sum_list = sum(List)
Answer = [int(sum_list-List[i]*(n-1)) for i in range(n)]
print(*Answer)