n = int(eval(input()))

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



a.append(0)

a.insert(0, 0)

costs = []

for i in range(n + 1):

    costs.append(abs(a[i + 1] - a[i]))



s = sum(costs)

for i in range(n):

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

    print(ans)
def main():

    n = int(eval(input()))

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





    a.append(0)

    a.insert(0, 0)

    costs = []

    for i in range(n + 1):

        costs.append(abs(a[i + 1] - a[i]))



    s = sum(costs)

    for i in range(n):

        print((s - costs[i] - costs[i + 1] + abs(a[i] - a[i + 2])))



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

def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    a.append(0)
    a.insert(0, 0)
    costs = []
    for i in range(n + 1):
        costs.append(abs(a[i + 1] - a[i]))
    s = sum(costs)
    for i in range(n):
        print((s - costs[i] - costs[i + 1] + abs(a[i] - a[i + 2])))


main()

-n = int(eval(input())) -a = list(map(int, input().split())) -a.append(0) -a.insert(0, 0) -costs = [] -for i in range(n + 1): -    costs.append(abs(a[i + 1] - a[i])) -s = sum(costs) -for i in range(n): -    ans = s - costs[i] - costs[i + 1] + abs(a[i] - a[i + 2]) -    print(ans) +def main(): +    n = int(eval(input())) +    a = list(map(int, input().split())) +    a.append(0) +    a.insert(0, 0) +    costs = [] +    for i in range(n + 1): +        costs.append(abs(a[i + 1] - a[i])) +    s = sum(costs) +    for i in range(n): +        print((s - costs[i] - costs[i + 1] + abs(a[i] - a[i + 2]))) + + +main()