N = int(eval(input()))

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



a.insert(0,0)

a.append(0)



all_sum = 0

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

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





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

    if a[i-1] <= a[i] <= a[i+1] or a[i-1] >= a[i] >= a[i+1]:

        print(all_sum)

    elif a[i-1] <= a[i]  and a[i-1] >=  a[i+1]:

        #増減

        print((all_sum - abs(a[i] - a[i-1]) * 2))

    elif  a[i-1] <= a[i]  and a[i-1] <= a[i+1]:

        #増減

        print((all_sum - abs(a[i] - a[i+1]) * 2))

    elif a[i-1] >= a[i]  and a[i-1] >=  a[i+1]:

        #減増

        print((all_sum - abs(a[i] - a[i+1]) * 2))

    elif a[i-1] >= a[i]  and a[i-1] <=  a[i+1]:

        #減増

        print((all_sum - abs(a[i] - a[i-1]) * 2))

    else:

        print((i, "yukkuri"))
N = int(eval(input()))

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



a.insert(0,0)

a.append(0)



all_sum = 0

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

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





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

    print((all_sum - (abs(a[i-1] - a[i]) + abs(a[i+1] - a[i])) + abs(a[i+1] - a[i-1])))
N = int(eval(input()))
a = list(map(int, input().split()))
a.insert(0, 0)
a.append(0)
all_sum = 0
for i in range(0, N + 1):
    all_sum += abs(a[i + 1] - a[i])
for i in range(1, N + 1):
    if a[i - 1] <= a[i] <= a[i + 1] or a[i - 1] >= a[i] >= a[i + 1]:
        print(all_sum)
    elif a[i - 1] <= a[i] and a[i - 1] >= a[i + 1]:
        # 増減
        print((all_sum - abs(a[i] - a[i - 1]) * 2))
    elif a[i - 1] <= a[i] and a[i - 1] <= a[i + 1]:
        # 増減
        print((all_sum - abs(a[i] - a[i + 1]) * 2))
    elif a[i - 1] >= a[i] and a[i - 1] >= a[i + 1]:
        # 減増
        print((all_sum - abs(a[i] - a[i + 1]) * 2))
    elif a[i - 1] >= a[i] and a[i - 1] <= a[i + 1]:
        # 減増
        print((all_sum - abs(a[i] - a[i - 1]) * 2))
    else:
        print((i, "yukkuri"))

N = int(eval(input()))
a = list(map(int, input().split()))
a.insert(0, 0)
a.append(0)
all_sum = 0
for i in range(0, N + 1):
    all_sum += abs(a[i + 1] - a[i])
for i in range(1, N + 1):
    print(
        (
            all_sum
            - (abs(a[i - 1] - a[i]) + abs(a[i + 1] - a[i]))
            + abs(a[i + 1] - a[i - 1])
        )
    )

-    if a[i - 1] <= a[i] <= a[i + 1] or a[i - 1] >= a[i] >= a[i + 1]: -        print(all_sum) -    elif a[i - 1] <= a[i] and a[i - 1] >= a[i + 1]: -        # 増減 -        print((all_sum - abs(a[i] - a[i - 1]) * 2)) -    elif a[i - 1] <= a[i] and a[i - 1] <= a[i + 1]: -        # 増減 -        print((all_sum - abs(a[i] - a[i + 1]) * 2)) -    elif a[i - 1] >= a[i] and a[i - 1] >= a[i + 1]: -        # 減増 -        print((all_sum - abs(a[i] - a[i + 1]) * 2)) -    elif a[i - 1] >= a[i] and a[i - 1] <= a[i + 1]: -        # 減増 -        print((all_sum - abs(a[i] - a[i - 1]) * 2)) -    else: -        print((i, "yukkuri")) +    print( +        ( +            all_sum +            - (abs(a[i - 1] - a[i]) + abs(a[i + 1] - a[i])) +            + abs(a[i + 1] - a[i - 1]) +        ) +    )