N = int(input()) y_list = list(map(int, input().split())) sum_y = sum(y_list) print(*list(map(lambda a: sum_y - (N - 1) * a, y_list)))