from collections import deque



n = int(eval(input()))

a = deque(list(map(int, input().split())))

a.appendleft(0)

a.append(0)



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

ans = 0



for i in range(n):

    ans = sum

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

    print(ans)
from collections import deque



n = int(eval(input()))

a = deque(list(map(int, input().split())))

a.appendleft(0)

a.append(0)

a = list(a)



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

ans = 0



for i in range(n):

    ans = sum

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

    print(ans)
from collections import deque

n = int(eval(input()))
a = deque(list(map(int, input().split())))
a.appendleft(0)
a.append(0)
sum = sum([abs(a[i + 1] - a[i]) for i in range(len(a) - 1)])
ans = 0
for i in range(n):
    ans = sum
    ans = ans - abs(a[i + 1] - a[i]) - abs(a[i + 2] - a[i + 1]) + abs(a[i + 2] - a[i])
    print(ans)

from collections import deque

n = int(eval(input()))
a = deque(list(map(int, input().split())))
a.appendleft(0)
a.append(0)
a = list(a)
sum = sum([abs(a[i + 1] - a[i]) for i in range(len(a) - 1)])
ans = 0
for i in range(n):
    ans = sum
    ans = ans - abs(a[i + 1] - a[i]) - abs(a[i + 2] - a[i + 1]) + abs(a[i + 2] - a[i])
    print(ans)

+a = list(a)