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(input())

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

res = 0

pre = 0

for a in A:

    res += abs(a-pre)

    pre = a

else:

    res += abs(0-pre)



#print(res)

ans = [0]*n

A = [0]+A+[0]

for i in range(n):

    j = i+1

    temp = res-abs(A[j-1]-A[j])-abs(A[j+1]-A[j])+abs(A[j+1]-A[j-1])

    ans[i] = temp

print(*ans, sep='\n')

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(input())
A = list(map(int, input().split()))
res = 0
pre = 0
for a in A:
    res += abs(a - pre)
    pre = a
else:
    res += abs(0 - pre)
# print(res)
ans = [0] * n
A = [0] + A + [0]
for i in range(n):
    j = i + 1
    temp = res - abs(A[j - 1] - A[j]) - abs(A[j + 1] - A[j]) + abs(A[j + 1] - A[j - 1])
    ans[i] = temp
print(*ans, sep="\n")

-n = int(eval(input())) +n = int(input()) +res = 0 +pre = 0 +for a in A: +    res += abs(a - pre) +    pre = a +else: +    res += abs(0 - pre) +# print(res) +ans = [0] * n -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) +for i in range(n): +    j = i + 1 +    temp = res - abs(A[j - 1] - A[j]) - abs(A[j + 1] - A[j]) + abs(A[j + 1] - A[j - 1]) +    ans[i] = temp +print(*ans, sep="\n")