n = int(input()) y = list(map(int, input().split())) total = sum(y) lst = [] for num in y: lst.append(total - (num) * (n - 1)) print(*lst)