a = int(input()) l = list(map(int,input().split())) L = [] s = sum(l) for i,S in enumerate(l): L.append(s - l[i]*(a-1)) print(*L)