import sys

from collections import defaultdict

from heapq import *

sys.setrecursionlimit(200000)

input = sys.stdin.readline



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

L = [int(v) for v in input().split()]

# L = [int(input()) for _ in range(Q)]

# S = input().strip()



su = abs(L[0])

a = [0] * N

for i in range(1, N):

    t = 0

    if L[i - 1] * L[i] < 0:

        t = abs(L[i - 1]) + abs(L[i])

    else:

        t = abs(L[i - 1] - L[i])

    su += t

    a[i] = t

su += abs(L[-1])



if L[0] * L[1] <= 0:

    print((su - abs(L[0]) * 2))

else:

    if L[0] < 0:

        if L[0] > L[1]:

            print(su)

        else:

            print((su - a[1] * 2))

    else:

        if L[0] < L[1]:

            print(su)

        else:

            print((su - a[1] * 2))



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

    c = a[i] + a[i + 1]



    t = 0

    if L[i - 1] * L[i + 1] < 0:

        t = abs(L[i - 1]) + abs(L[i + 1])

    else:

        t = abs(L[i - 1] - L[i + 1])



    print((su - c + t))



if L[-2] * L[-1] <= 0:

    print((su - abs(L[-1]) * 2))

else:

    if L[-1] < 0:

        if L[-1] > L[-2]:

            print(su)

        else:

            print((su - a[-1] * 2))

    else:

        if L[-1] < L[-2]:

            print(su)

        else:

            print((su - a[-1] * 2))
import sys

from collections import defaultdict

from heapq import *

sys.setrecursionlimit(200000)

input = sys.stdin.readline



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

L = [int(v) for v in input().split()]

# L = [int(input()) for _ in range(Q)]

# S = input().strip()



L = [0] + L + [0]



su = 0

for i in range(N + 1):

    su += abs(L[i] - L[i + 1])



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

    print((su + abs(L[i - 1] - L[i + 1]) - abs(L[i - 1] - L[i]) - abs(L[i] - L[i + 1])))
import sys
from collections import defaultdict
from heapq import *

sys.setrecursionlimit(200000)
input = sys.stdin.readline
(N,) = list(map(int, input().split()))
L = [int(v) for v in input().split()]
# L = [int(input()) for _ in range(Q)]
# S = input().strip()
su = abs(L[0])
a = [0] * N
for i in range(1, N):
    t = 0
    if L[i - 1] * L[i] < 0:
        t = abs(L[i - 1]) + abs(L[i])
    else:
        t = abs(L[i - 1] - L[i])
    su += t
    a[i] = t
su += abs(L[-1])
if L[0] * L[1] <= 0:
    print((su - abs(L[0]) * 2))
else:
    if L[0] < 0:
        if L[0] > L[1]:
            print(su)
        else:
            print((su - a[1] * 2))
    else:
        if L[0] < L[1]:
            print(su)
        else:
            print((su - a[1] * 2))
for i in range(1, N - 1):
    c = a[i] + a[i + 1]
    t = 0
    if L[i - 1] * L[i + 1] < 0:
        t = abs(L[i - 1]) + abs(L[i + 1])
    else:
        t = abs(L[i - 1] - L[i + 1])
    print((su - c + t))
if L[-2] * L[-1] <= 0:
    print((su - abs(L[-1]) * 2))
else:
    if L[-1] < 0:
        if L[-1] > L[-2]:
            print(su)
        else:
            print((su - a[-1] * 2))
    else:
        if L[-1] < L[-2]:
            print(su)
        else:
            print((su - a[-1] * 2))

import sys
from collections import defaultdict
from heapq import *

sys.setrecursionlimit(200000)
input = sys.stdin.readline
(N,) = list(map(int, input().split()))
L = [int(v) for v in input().split()]
# L = [int(input()) for _ in range(Q)]
# S = input().strip()
L = [0] + L + [0]
su = 0
for i in range(N + 1):
    su += abs(L[i] - L[i + 1])
for i in range(1, N + 1):
    print((su + abs(L[i - 1] - L[i + 1]) - abs(L[i - 1] - L[i]) - abs(L[i] - L[i + 1])))

-su = abs(L[0]) -a = [0] * N -for i in range(1, N): -    t = 0 -    if L[i - 1] * L[i] < 0: -        t = abs(L[i - 1]) + abs(L[i]) -    else: -        t = abs(L[i - 1] - L[i]) -    su += t -    a[i] = t -su += abs(L[-1]) -if L[0] * L[1] <= 0: -    print((su - abs(L[0]) * 2)) -else: -    if L[0] < 0: -        if L[0] > L[1]: -            print(su) -        else: -            print((su - a[1] * 2)) -    else: -        if L[0] < L[1]: -            print(su) -        else: -            print((su - a[1] * 2)) -for i in range(1, N - 1): -    c = a[i] + a[i + 1] -    t = 0 -    if L[i - 1] * L[i + 1] < 0: -        t = abs(L[i - 1]) + abs(L[i + 1]) -    else: -        t = abs(L[i - 1] - L[i + 1]) -    print((su - c + t)) -if L[-2] * L[-1] <= 0: -    print((su - abs(L[-1]) * 2)) -else: -    if L[-1] < 0: -        if L[-1] > L[-2]: -            print(su) -        else: -            print((su - a[-1] * 2)) -    else: -        if L[-1] < L[-2]: -            print(su) -        else: -            print((su - a[-1] * 2)) +L = [0] + L + [0] +su = 0 +for i in range(N + 1): +    su += abs(L[i] - L[i + 1]) +for i in range(1, N + 1): +    print((su + abs(L[i - 1] - L[i + 1]) - abs(L[i - 1] - L[i]) - abs(L[i] - L[i + 1])))