N = int(input()) y = [int(i)for i in input().split()] s = sum(y) x = [str(s-i*(N-1)) for i in y] print(" ".join(x))