n = int(input()) lst = list(map(int,input().split())) s = sum(lst) A = [] for i in range(n): A.append(s - lst[i]*(n-1)) print(*A)