import itertools as it

import collections as col

import heapq as hq

import sys

import copy as cp

sys.setrecursionlimit(10**9)

input = sys.stdin.readline





def dump(*objects):

    print(*objects, file=sys.stderr)





N = int(input())

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

dump(N, A)

B = cp.deepcopy(A)

C = cp.deepcopy(A)

for i in range(1, len(A)):

    dump(i)

    B[i] = B[i-1] + abs(A[i]-A[i-1])

for i in range(len(A)-2, -1, -1):

    dump(i)

    C[i] = C[i+1] + abs(A[i]-A[i+1])

dump(A, B, C)

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

    dump(i, B[i-1] + B[N+1] - B[i+1] + abs(A[i-1]-A[i+1]))

    print(B[i-1] + C[i+1] + abs(A[i-1]-A[i+1]))



exit(0)

import itertools as it

import collections as col

import heapq as hq

import sys

import copy as cp

sys.setrecursionlimit(10**9)

args = sys.argv

input = sys.stdin.readline





def dump(*objects):

    if len(args) == 2 and args[1] == "DEBUG":

        print(*objects, file=sys.stderr)





N = int(input())

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

dump(N, A)

B = cp.deepcopy(A)

C = cp.deepcopy(A)

for i in range(1, len(A)):

    dump(i)

    B[i] = B[i - 1] + abs(A[i] - A[i - 1])

for i in range(len(A) - 2, -1, -1):

    dump(i)

    C[i] = C[i+1] + abs(A[i]-A[i+1])

dump(A, B, C)

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

    dump(i, B[i-1] + B[N+1] - B[i+1] + abs(A[i-1]-A[i+1]))

    print(B[i-1] + C[i+1] + abs(A[i-1]-A[i+1]))



exit(0)

import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp

sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def dump(*objects):
    print(*objects, file=sys.stderr)


N = int(input())
A = [0] + list(map(int, input().split())) + [0]
dump(N, A)
B = cp.deepcopy(A)
C = cp.deepcopy(A)
for i in range(1, len(A)):
    dump(i)
    B[i] = B[i - 1] + abs(A[i] - A[i - 1])
for i in range(len(A) - 2, -1, -1):
    dump(i)
    C[i] = C[i + 1] + abs(A[i] - A[i + 1])
dump(A, B, C)
for i in range(1, N + 1):
    dump(i, B[i - 1] + B[N + 1] - B[i + 1] + abs(A[i - 1] - A[i + 1]))
    print(B[i - 1] + C[i + 1] + abs(A[i - 1] - A[i + 1]))
exit(0)

import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp

sys.setrecursionlimit(10**9)
args = sys.argv
input = sys.stdin.readline


def dump(*objects):
    if len(args) == 2 and args[1] == "DEBUG":
        print(*objects, file=sys.stderr)


N = int(input())
A = [0] + list(map(int, input().split())) + [0]
dump(N, A)
B = cp.deepcopy(A)
C = cp.deepcopy(A)
for i in range(1, len(A)):
    dump(i)
    B[i] = B[i - 1] + abs(A[i] - A[i - 1])
for i in range(len(A) - 2, -1, -1):
    dump(i)
    C[i] = C[i + 1] + abs(A[i] - A[i + 1])
dump(A, B, C)
for i in range(1, N + 1):
    dump(i, B[i - 1] + B[N + 1] - B[i + 1] + abs(A[i - 1] - A[i + 1]))
    print(B[i - 1] + C[i + 1] + abs(A[i - 1] - A[i + 1]))
exit(0)

+args = sys.argv -    print(*objects, file=sys.stderr) +    if len(args) == 2 and args[1] == "DEBUG": +        print(*objects, file=sys.stderr)