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