N,*A=list(map(int,open(0).read().split()))

A=[0]+A+[0]

f=lambda i:abs(A[i]-A[i+1])

s=sum(f(i)for i in range(N+1))

print((*[s-f(i)-f(i+1)+abs(A[i]-A[i+2])for i in range(N)]))
N,*A=list(map(int,open(0).read().split()))

A=[0]+A+[0]

f=abs

s=sum(f(i-j)for i,j in zip(A,A[1:]))

print((*[s-f(i-j)-f(j-k)+f(i-k)for i,j,k in zip(A,A[1:],A[2:])]))
N, *A = list(map(int, open(0).read().split()))
A = [0] + A + [0]
f = lambda i: abs(A[i] - A[i + 1])
s = sum(f(i) for i in range(N + 1))
print((*[s - f(i) - f(i + 1) + abs(A[i] - A[i + 2]) for i in range(N)]))

N, *A = list(map(int, open(0).read().split()))
A = [0] + A + [0]
f = abs
s = sum(f(i - j) for i, j in zip(A, A[1:]))
print((*[s - f(i - j) - f(j - k) + f(i - k) for i, j, k in zip(A, A[1:], A[2:])]))

-f = lambda i: abs(A[i] - A[i + 1]) -s = sum(f(i) for i in range(N + 1)) -print((*[s - f(i) - f(i + 1) + abs(A[i] - A[i + 2]) for i in range(N)])) +f = abs +s = sum(f(i - j) for i, j in zip(A, A[1:])) +print((*[s - f(i - j) - f(j - k) + f(i - k) for i, j, k in zip(A, A[1:], A[2:])]))