N = int(eval(input()))

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



total = 0

for i in range(N + 1):

    total += abs(A[i + 1] - A[i])

for i in range(N):

    print((total + abs(A[i + 2] - A[i]) - (abs(A[i + 1] - A[i] ) + abs(A[i + 2] - A[i + 1]))))

N, *A = list(map(int, open(0).read().split()))



A = [0] + A + [0]



acc = [0] * (N + 2)

for i in range(N + 1):

    acc[i + 1] = acc[i] + abs(A[i + 1] - A[i])



for i in range(N):

    left = acc[i] - acc[0]

    right = acc[N + 1] - acc[i + 2]

    print((left + abs(A[i + 2] - A[i]) + right))



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

N, *A = list(map(int, open(0).read().split()))
A = [0] + A + [0]
acc = [0] * (N + 2)
for i in range(N + 1):
    acc[i + 1] = acc[i] + abs(A[i + 1] - A[i])
for i in range(N):
    left = acc[i] - acc[0]
    right = acc[N + 1] - acc[i + 2]
    print((left + abs(A[i + 2] - A[i]) + right))

-N = int(eval(input())) -A = [0] + list(map(int, input().split())) + [0] -total = 0 +N, *A = list(map(int, open(0).read().split())) +A = [0] + A + [0] +acc = [0] * (N + 2) -    total += abs(A[i + 1] - A[i]) +    acc[i + 1] = acc[i] + abs(A[i + 1] - A[i]) -    print( -        ( -            total -            + abs(A[i + 2] - A[i]) -            - (abs(A[i + 1] - A[i]) + abs(A[i + 2] - A[i + 1])) -        ) -    ) +    left = acc[i] - acc[0] +    right = acc[N + 1] - acc[i + 2] +    print((left + abs(A[i + 2] - A[i]) + right))