N = int(eval(input()))

A = [0] + list(map(int, input().split())) + [0]



dist = 0

for x, y in zip(A[:-1], A[1:]):

    dist += abs(x - y)



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

    l, m, r = A[i - 1], A[i], A[i + 1]

    d = dist

    d -= abs(l - m)

    d -= abs(r - m)

    d += abs(r - l)

    print(d)
N = int(eval(input()))

A = [0] + list(map(int, input().split())) + [0]



d = [x - y for y, x in zip(A[:-1], A[1:])]

dist = sum(abs(i) for i in d)



for i in range(N):

    ans = dist - abs(d[i]) - abs(d[i + 1])

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

    print(ans)
N = int(eval(input()))
A = [0] + list(map(int, input().split())) + [0]
dist = 0
for x, y in zip(A[:-1], A[1:]):
    dist += abs(x - y)
for i in range(1, N + 1):
    l, m, r = A[i - 1], A[i], A[i + 1]
    d = dist
    d -= abs(l - m)
    d -= abs(r - m)
    d += abs(r - l)
    print(d)

N = int(eval(input()))
A = [0] + list(map(int, input().split())) + [0]
d = [x - y for y, x in zip(A[:-1], A[1:])]
dist = sum(abs(i) for i in d)
for i in range(N):
    ans = dist - abs(d[i]) - abs(d[i + 1])
    ans += abs(A[i] - A[i + 2])
    print(ans)

-dist = 0 -for x, y in zip(A[:-1], A[1:]): -    dist += abs(x - y) -for i in range(1, N + 1): -    l, m, r = A[i - 1], A[i], A[i + 1] -    d = dist -    d -= abs(l - m) -    d -= abs(r - m) -    d += abs(r - l) -    print(d) +d = [x - y for y, x in zip(A[:-1], A[1:])] +dist = sum(abs(i) for i in d) +for i in range(N): +    ans = dist - abs(d[i]) - abs(d[i + 1]) +    ans += abs(A[i] - A[i + 2]) +    print(ans)