n = int(eval(input()))

alist = [0] + list(map(int, input().split()))

total = 0

for i in range(n):total += abs(alist[i]-alist[i+1])

total += abs(alist[-1])



for i in range(1,n):

  print((total-abs(alist[i]-alist[i-1])-abs(alist[i+1]-alist[i])+ abs(alist[i+1]-alist[i-1])))

print((total-abs(alist[-1]-alist[-2])-abs(alist[-1]-alist[0])+abs(alist[-2]-alist[0])))
N = int(eval(input()))

A = [0] + list(map(int, input().split())) + [0]

costs = [0] + [abs(A[i] - A[i+1]) for i in range(N+1)]

sum_costs = sum(costs)



for i in range(1, N+1):

    print((sum_costs - costs[i] - costs[i+1] + abs(A[i-1] - A[i+1])))

n = int(eval(input()))
alist = [0] + list(map(int, input().split()))
total = 0
for i in range(n):
    total += abs(alist[i] - alist[i + 1])
total += abs(alist[-1])
for i in range(1, n):
    print(
        (
            total
            - abs(alist[i] - alist[i - 1])
            - abs(alist[i + 1] - alist[i])
            + abs(alist[i + 1] - alist[i - 1])
        )
    )
print(
    (
        total
        - abs(alist[-1] - alist[-2])
        - abs(alist[-1] - alist[0])
        + abs(alist[-2] - alist[0])
    )
)

N = int(eval(input()))
A = [0] + list(map(int, input().split())) + [0]
costs = [0] + [abs(A[i] - A[i + 1]) for i in range(N + 1)]
sum_costs = sum(costs)
for i in range(1, N + 1):
    print((sum_costs - costs[i] - costs[i + 1] + abs(A[i - 1] - A[i + 1])))

-n = int(eval(input())) -alist = [0] + list(map(int, input().split())) -total = 0 -for i in range(n): -    total += abs(alist[i] - alist[i + 1]) -total += abs(alist[-1]) -for i in range(1, n): -    print( -        ( -            total -            - abs(alist[i] - alist[i - 1]) -            - abs(alist[i + 1] - alist[i]) -            + abs(alist[i + 1] - alist[i - 1]) -        ) -    ) -print( -    ( -        total -        - abs(alist[-1] - alist[-2]) -        - abs(alist[-1] - alist[0]) -        + abs(alist[-2] - alist[0]) -    ) -) +N = int(eval(input())) +A = [0] + list(map(int, input().split())) + [0] +costs = [0] + [abs(A[i] - A[i + 1]) for i in range(N + 1)] +sum_costs = sum(costs) +for i in range(1, N + 1): +    print((sum_costs - costs[i] - costs[i + 1] + abs(A[i - 1] - A[i + 1])))