N = eval(input())

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

A = [0] + A + [0]

cost = sum([abs(A[i] - A[i + 1]) for i in range(N + 1)])

for i in range(N):

    a, b, c = A[i:i + 3]

    if max(a, b, c) == b or min(a, b, c) == b:

        diff = - abs(a - b) - abs(b - c) + abs(a - c)

    else:

        diff = 0

    print(cost + diff)

N = eval(input())

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

cost = sum([abs(A[i] - A[i + 1]) for i in range(N + 1)])

for i in range(N):

    a, b, c = A[i:i + 3]

    print(cost - abs(a - b) - abs(b - c) + abs(a - c))

N = eval(input())
A = list(map(int, input().split()))
A = [0] + A + [0]
cost = sum([abs(A[i] - A[i + 1]) for i in range(N + 1)])
for i in range(N):
    a, b, c = A[i : i + 3]
    if max(a, b, c) == b or min(a, b, c) == b:
        diff = -abs(a - b) - abs(b - c) + abs(a - c)
    else:
        diff = 0
    print(cost + diff)

N = eval(input())
A = [0] + list(map(int, input().split())) + [0]
cost = sum([abs(A[i] - A[i + 1]) for i in range(N + 1)])
for i in range(N):
    a, b, c = A[i : i + 3]
    print(cost - abs(a - b) - abs(b - c) + abs(a - c))

-A = list(map(int, input().split())) -A = [0] + A + [0] +A = [0] + list(map(int, input().split())) + [0] -    if max(a, b, c) == b or min(a, b, c) == b: -        diff = -abs(a - b) - abs(b - c) + abs(a - c) -    else: -        diff = 0 -    print(cost + diff) +    print(cost - abs(a - b) - abs(b - c) + abs(a - c))