n = int(eval(input()))

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

ans = [-1]*n

A = [0]+A+[0]

s = 0

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

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

#print(s)

for i in range(n):

    temp = s

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

    temp -= abs(A[i+2]-A[i+1])

    temp += abs(A[i+2]-A[i])

    ans[i] = temp

for i in range(n):

    print((ans[i]))

n = int(eval(input()))

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



A = [0]+A+[0]



s = 0

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

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



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

    ans = s

    ans -= abs(A[i]-A[i-1])

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

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

    print(ans)

n = int(eval(input()))
A = list(map(int, input().split()))
ans = [-1] * n
A = [0] + A + [0]
s = 0
for i in range(1, n + 2):
    s += abs(A[i] - A[i - 1])
# print(s)
for i in range(n):
    temp = s
    temp -= abs(A[i + 1] - A[i])
    temp -= abs(A[i + 2] - A[i + 1])
    temp += abs(A[i + 2] - A[i])
    ans[i] = temp
for i in range(n):
    print((ans[i]))

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

-ans = [-1] * n -# print(s) -for i in range(n): -    temp = s -    temp -= abs(A[i + 1] - A[i]) -    temp -= abs(A[i + 2] - A[i + 1]) -    temp += abs(A[i + 2] - A[i]) -    ans[i] = temp -for i in range(n): -    print((ans[i])) +for i in range(1, n + 1): +    ans = s +    ans -= abs(A[i] - A[i - 1]) +    ans -= abs(A[i + 1] - A[i]) +    ans += abs(A[i + 1] - A[i - 1]) +    print(ans)