N = int(eval(input()))

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

total = 0

p = 0

for a in A:

    total += abs(p-a)

    p = a

total += abs(p)



print((total - abs(A[0]) - abs(A[0]-A[1]) + abs(A[1])))

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

    print((total - abs(A[n-1]-A[n]) - abs(A[n]-A[n+1]) + abs(A[n-1]-A[n+1])))

print((total - abs(A[N-2]-A[N-1]) - abs(A[N-1]) + abs(A[N-2])))
def solve():

    N = int(eval(input()))

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

    total = 0

    p = 0

    for a in A:

        total += abs(p-a)

        p = a

    total += abs(p)

    

    print((total - abs(A[0]) - abs(A[0]-A[1]) + abs(A[1])))

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

        print((total - abs(A[n-1]-A[n]) - abs(A[n]-A[n+1]) + abs(A[n-1]-A[n+1])))

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





if __name__ == '__main__':

    solve()
N = int(eval(input()))
A = list(map(int, input().split()))
total = 0
p = 0
for a in A:
    total += abs(p - a)
    p = a
total += abs(p)
print((total - abs(A[0]) - abs(A[0] - A[1]) + abs(A[1])))
for n in range(1, N - 1):
    print(
        (total - abs(A[n - 1] - A[n]) - abs(A[n] - A[n + 1]) + abs(A[n - 1] - A[n + 1]))
    )
print((total - abs(A[N - 2] - A[N - 1]) - abs(A[N - 1]) + abs(A[N - 2])))

def solve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    total = 0
    p = 0
    for a in A:
        total += abs(p - a)
        p = a
    total += abs(p)
    print((total - abs(A[0]) - abs(A[0] - A[1]) + abs(A[1])))
    for n in range(1, N - 1):
        print(
            (
                total
                - abs(A[n - 1] - A[n])
                - abs(A[n] - A[n + 1])
                + abs(A[n - 1] - A[n + 1])
            )
        )
    print((total - abs(A[N - 2] - A[N - 1]) - abs(A[N - 1]) + abs(A[N - 2])))


if __name__ == "__main__":
    solve()

-N = int(eval(input())) -A = list(map(int, input().split())) -total = 0 -p = 0 -for a in A: -    total += abs(p - a) -    p = a -total += abs(p) -print((total - abs(A[0]) - abs(A[0] - A[1]) + abs(A[1]))) -for n in range(1, N - 1): -    print( -        (total - abs(A[n - 1] - A[n]) - abs(A[n] - A[n + 1]) + abs(A[n - 1] - A[n + 1])) -    ) -print((total - abs(A[N - 2] - A[N - 1]) - abs(A[N - 1]) + abs(A[N - 2]))) +def solve(): +    N = int(eval(input())) +    A = list(map(int, input().split())) +    total = 0 +    p = 0 +    for a in A: +        total += abs(p - a) +        p = a +    total += abs(p) +    print((total - abs(A[0]) - abs(A[0] - A[1]) + abs(A[1]))) +    for n in range(1, N - 1): +        print( +            ( +                total +                - abs(A[n - 1] - A[n]) +                - abs(A[n] - A[n + 1]) +                + abs(A[n - 1] - A[n + 1]) +            ) +        ) +    print((total - abs(A[N - 2] - A[N - 1]) - abs(A[N - 1]) + abs(A[N - 2]))) + + +if __name__ == "__main__": +    solve()