n = int(input()) a = list(map(int, input().split())) s = sum(a) print(*[s - x*(n-1) for x in a])