n = int(eval(input()))

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



cost = 0

for i in range(n+1):

  cost += abs(a[i+1]-a[i])

  

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

  if (a[i]>a[i-1] and a[i]>a[i+1]) or (a[i]<a[i-1] and a[i]<a[i+1]):

    print((cost - abs(a[i]-a[i-1]) - abs(a[i]-a[i+1]) + abs(a[i+1]-a[i-1])))

  else:

    print(cost)
n = int(eval(input()))

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

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

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

  print((cost - abs(a[i]-a[i-1]) - abs(a[i]-a[i+1]) + abs(a[i+1]-a[i-1])))

n = int(eval(input()))
a = [0] + list(map(int, input().split())) + [0]
cost = 0
for i in range(n + 1):
    cost += abs(a[i + 1] - a[i])
for i in range(1, n + 1):
    if (a[i] > a[i - 1] and a[i] > a[i + 1]) or (a[i] < a[i - 1] and a[i] < a[i + 1]):
        print(
            (
                cost
                - abs(a[i] - a[i - 1])
                - abs(a[i] - a[i + 1])
                + abs(a[i + 1] - a[i - 1])
            )
        )
    else:
        print(cost)

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

-cost = 0 -for i in range(n + 1): -    cost += abs(a[i + 1] - a[i]) +cost = sum([abs(a[i + 1] - a[i]) for i in range(n + 1)]) -    if (a[i] > a[i - 1] and a[i] > a[i + 1]) or (a[i] < a[i - 1] and a[i] < a[i + 1]): -        print( -            ( -                cost -                - abs(a[i] - a[i - 1]) -                - abs(a[i] - a[i + 1]) -                + abs(a[i + 1] - a[i - 1]) -            ) -        ) -    else: -        print(cost) +    print( +        (cost - abs(a[i] - a[i - 1]) - abs(a[i] - a[i + 1]) + abs(a[i + 1] - a[i - 1])) +    )