n = int(input()) y = list(map(int, input().split())) sumy = sum(y) ans = [str(sumy - e * (n - 1)) for e in y] print(' '.join(ans))