N = int(eval(input()))



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



B = [0] + A + [0]

S = [0]*(N+2) 

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

    S[i] = S[i-1] + abs(B[i] - B[i-1])



max_s = S[-1]

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

    ans = 0

    ans += S[i-1]

    ans += abs(B[i-1]-B[i+1])

    ans += max_s - S[i+1]

    print(ans)

N = int(eval(input()))



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



B = [0] + A + [0]



diff_1 = [abs(B[i+1] - B[i]) for i in range(N+1)]

diff_2 = [abs(B[i+2] - B[i]) for i in range(N)]

ans = sum(diff_1)



for i in range(N):

    tmp = ans + diff_2[i] - (diff_1[i] + diff_1[i+1])

    print(tmp)
N = int(eval(input()))
A = list(map(int, input().split()))
B = [0] + A + [0]
S = [0] * (N + 2)
for i in range(1, N + 2):
    S[i] = S[i - 1] + abs(B[i] - B[i - 1])
max_s = S[-1]
for i in range(1, N + 1):
    ans = 0
    ans += S[i - 1]
    ans += abs(B[i - 1] - B[i + 1])
    ans += max_s - S[i + 1]
    print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
B = [0] + A + [0]
diff_1 = [abs(B[i + 1] - B[i]) for i in range(N + 1)]
diff_2 = [abs(B[i + 2] - B[i]) for i in range(N)]
ans = sum(diff_1)
for i in range(N):
    tmp = ans + diff_2[i] - (diff_1[i] + diff_1[i + 1])
    print(tmp)

-S = [0] * (N + 2) -for i in range(1, N + 2): -    S[i] = S[i - 1] + abs(B[i] - B[i - 1]) -max_s = S[-1] -for i in range(1, N + 1): -    ans = 0 -    ans += S[i - 1] -    ans += abs(B[i - 1] - B[i + 1]) -    ans += max_s - S[i + 1] -    print(ans) +diff_1 = [abs(B[i + 1] - B[i]) for i in range(N + 1)] +diff_2 = [abs(B[i + 2] - B[i]) for i in range(N)] +ans = sum(diff_1) +for i in range(N): +    tmp = ans + diff_2[i] - (diff_1[i] + diff_1[i + 1]) +    print(tmp)