N = int(input()) Y = list(map(int, input().split())) X = [0 for _ in range(N)] S = sum(Y) for i in range(N): X[i] = S - (N - 1) * Y[i] print(*X)