N = int(eval(input()))

A = list(map(int, input().split()))



D = 0

for i in range(1, N):

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

D += abs(A[0] - 0)

D += abs(A[N-1] - 0)



ans = []

for i in range(N):

    if i == 0:

        a = abs(A[i+1] - A[i]) + abs(A[i] - 0)

        b = abs(A[i+1] - 0)

    elif i == N - 1:

        a = abs(0 - A[i]) + abs(A[i] - A[i-1])

        b = abs(0 - A[i-1])

    else:

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

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

    ans.append(D - a + b)



for x in ans:

    print(x)

N = int(eval(input()))

A = list(map(int, input().split()))

A.insert(0, 0)

A.append(0)



D = 0

for i in range(N+1):

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



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

    dist = D - (abs(A[i-1] - A[i]) + abs(A[i] - A[i+1])) + abs(A[i-1] - A[i+1])

    print(dist)
N = int(eval(input()))
A = list(map(int, input().split()))
D = 0
for i in range(1, N):
    D += abs(A[i] - A[i - 1])
D += abs(A[0] - 0)
D += abs(A[N - 1] - 0)
ans = []
for i in range(N):
    if i == 0:
        a = abs(A[i + 1] - A[i]) + abs(A[i] - 0)
        b = abs(A[i + 1] - 0)
    elif i == N - 1:
        a = abs(0 - A[i]) + abs(A[i] - A[i - 1])
        b = abs(0 - A[i - 1])
    else:
        a = abs(A[i + 1] - A[i]) + abs(A[i] - A[i - 1])
        b = abs(A[i + 1] - A[i - 1])
    ans.append(D - a + b)
for x in ans:
    print(x)

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

+A.insert(0, 0) +A.append(0) -for i in range(1, N): -    D += abs(A[i] - A[i - 1]) -D += abs(A[0] - 0) -D += abs(A[N - 1] - 0) -ans = [] -for i in range(N): -    if i == 0: -        a = abs(A[i + 1] - A[i]) + abs(A[i] - 0) -        b = abs(A[i + 1] - 0) -    elif i == N - 1: -        a = abs(0 - A[i]) + abs(A[i] - A[i - 1]) -        b = abs(0 - A[i - 1]) -    else: -        a = abs(A[i + 1] - A[i]) + abs(A[i] - A[i - 1]) -        b = abs(A[i + 1] - A[i - 1]) -    ans.append(D - a + b) -for x in ans: -    print(x) +for i in range(N + 1): +    D += abs(A[i + 1] - A[i]) +for i in range(1, N + 1): +    dist = D - (abs(A[i - 1] - A[i]) + abs(A[i] - A[i + 1])) + abs(A[i - 1] - A[i + 1]) +    print(dist)