N = int(eval(input()))

A = [int(i) for i in input().split()]

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

for i in range(N-1):

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

ans = [dif] * N



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

    

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

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

ans[N-1] = ans[N-1] - abs(A[N-1]) + abs(A[N-2])  - abs(A[N-1]-A[N-2])



for i in ans:

    print(i)
n = int(eval(input()))

a = [int(i) for i in input().split()]

ans = [0] * n

summ = sum([abs(a[i]-a[i+1]) for i in range(n-1)])

summ += abs(a[0]) + abs(a[-1])

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

  ans[i] = summ -abs(a[i-1]-a[i])-abs(a[i+1]-a[i])+abs(a[i-1]-a[i+1])

ans[0] = summ - abs(a[0]) -abs(a[0]-a[1]) + abs(a[1])

ans[-1] = summ - abs(a[-1]) -abs(a[-1]-a[-2])+abs(a[-2])

for i in ans:

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

n = int(eval(input()))
a = [int(i) for i in input().split()]
ans = [0] * n
summ = sum([abs(a[i] - a[i + 1]) for i in range(n - 1)])
summ += abs(a[0]) + abs(a[-1])
for i in range(1, n - 1):
    ans[i] = (
        summ - abs(a[i - 1] - a[i]) - abs(a[i + 1] - a[i]) + abs(a[i - 1] - a[i + 1])
    )
ans[0] = summ - abs(a[0]) - abs(a[0] - a[1]) + abs(a[1])
ans[-1] = summ - abs(a[-1]) - abs(a[-1] - a[-2]) + abs(a[-2])
for i in ans:
    print(i)

-N = int(eval(input())) -A = [int(i) for i in input().split()] -dif = abs(A[0]) + abs(A[N - 1]) -for i in range(N - 1): -    dif += abs(A[i] - A[i + 1]) -ans = [dif] * N -for i in range(1, N - 1): -    ans[i] += -abs(A[i - 1] - A[i]) - abs(A[i] - A[i + 1]) + abs(A[i - 1] - A[i + 1]) -ans[0] = ans[0] - abs(A[0]) + abs(A[1]) - abs(A[0] - A[1]) -ans[N - 1] = ans[N - 1] - abs(A[N - 1]) + abs(A[N - 2]) - abs(A[N - 1] - A[N - 2]) +n = int(eval(input())) +a = [int(i) for i in input().split()] +ans = [0] * n +summ = sum([abs(a[i] - a[i + 1]) for i in range(n - 1)]) +summ += abs(a[0]) + abs(a[-1]) +for i in range(1, n - 1): +    ans[i] = ( +        summ - abs(a[i - 1] - a[i]) - abs(a[i + 1] - a[i]) + abs(a[i - 1] - a[i + 1]) +    ) +ans[0] = summ - abs(a[0]) - abs(a[0] - a[1]) + abs(a[1]) +ans[-1] = summ - abs(a[-1]) - abs(a[-1] - a[-2]) + abs(a[-2])