import numpy as np



def main():

    #1. make master list

    N = int(eval(input()))

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



    A.append(0)

    A.insert(0,0)



    A = np.array(A)

    

    cost = np.abs(A[1:] - A[:-1])    

    total = sum(cost)    

    #2. remove i-th componet

    for i in range(N):



        #3. output

        print((total - cost[i] - cost[i+1] + abs(A[i+2]-A[i])))



if __name__ == "__main__":

    main()
N = int(eval(input()))

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

A.append(0)

A.insert(0,0)



total = 0

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

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



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

    print((total - abs(A[i+1]-A[i]) - abs(A[i]-A[i-1]) + abs(A[i+1]-A[i-1])))
import numpy as np


def main():
    # 1. make master list
    N = int(eval(input()))
    A = list(map(int, input().split()))
    A.append(0)
    A.insert(0, 0)
    A = np.array(A)
    cost = np.abs(A[1:] - A[:-1])
    total = sum(cost)
    # 2. remove i-th componet
    for i in range(N):
        # 3. output
        print((total - cost[i] - cost[i + 1] + abs(A[i + 2] - A[i])))


if __name__ == "__main__":
    main()

N = int(eval(input()))
A = list(map(int, input().split()))
A.append(0)
A.insert(0, 0)
total = 0
for i in range(1, N + 2):
    total += abs(A[i] - A[i - 1])
for i in range(1, N + 1):
    print(
        (total - abs(A[i + 1] - A[i]) - abs(A[i] - A[i - 1]) + abs(A[i + 1] - A[i - 1]))
    )

-import numpy as np - - -def main(): -    # 1. make master list -    N = int(eval(input())) -    A = list(map(int, input().split())) -    A.append(0) -    A.insert(0, 0) -    A = np.array(A) -    cost = np.abs(A[1:] - A[:-1]) -    total = sum(cost) -    # 2. remove i-th componet -    for i in range(N): -        # 3. output -        print((total - cost[i] - cost[i + 1] + abs(A[i + 2] - A[i]))) - - -if __name__ == "__main__": -    main() +N = int(eval(input())) +A = list(map(int, input().split())) +A.append(0) +A.insert(0, 0) +total = 0 +for i in range(1, N + 2): +    total += abs(A[i] - A[i - 1]) +for i in range(1, N + 1): +    print( +        (total - abs(A[i + 1] - A[i]) - abs(A[i] - A[i - 1]) + abs(A[i + 1] - A[i - 1])) +    )