import sys

def input(): return sys.stdin.readline().strip()



def resolve():

    n=int(eval(input()))

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

    max=0

    for i in range(n+1):

        max+=abs(l[i+1]-l[i])

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

        if l[j-1]<l[j]<l[j+1] or l[j-1]>l[j]>l[j+1]:

            print(max)

        else:

            x=abs(l[j+1]-l[j])

            y=abs(l[j]-l[j-1])

            z=abs(l[j+1]-l[j-1])

            print((max-x-y+z))

resolve()
import sys

def input(): return sys.stdin.readline().strip()



def resolve():

    n=int(eval(input()))

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

    max=0

    for i in range(n+1):

        max+=abs(l[i+1]-l[i])

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

        x=abs(l[j+1]-l[j])

        y=abs(l[j]-l[j-1])

        z=abs(l[j+1]-l[j-1])

        print((max-x-y+z))

resolve()
import sys


def input():
    return sys.stdin.readline().strip()


def resolve():
    n = int(eval(input()))
    l = [0] + list(map(int, input().split())) + [0]
    max = 0
    for i in range(n + 1):
        max += abs(l[i + 1] - l[i])
    for j in range(1, n + 1):
        if l[j - 1] < l[j] < l[j + 1] or l[j - 1] > l[j] > l[j + 1]:
            print(max)
        else:
            x = abs(l[j + 1] - l[j])
            y = abs(l[j] - l[j - 1])
            z = abs(l[j + 1] - l[j - 1])
            print((max - x - y + z))


resolve()

import sys


def input():
    return sys.stdin.readline().strip()


def resolve():
    n = int(eval(input()))
    l = [0] + list(map(int, input().split())) + [0]
    max = 0
    for i in range(n + 1):
        max += abs(l[i + 1] - l[i])
    for j in range(1, n + 1):
        x = abs(l[j + 1] - l[j])
        y = abs(l[j] - l[j - 1])
        z = abs(l[j + 1] - l[j - 1])
        print((max - x - y + z))


resolve()

-        if l[j - 1] < l[j] < l[j + 1] or l[j - 1] > l[j] > l[j + 1]: -            print(max) -        else: -            x = abs(l[j + 1] - l[j]) -            y = abs(l[j] - l[j - 1]) -            z = abs(l[j + 1] - l[j - 1]) -            print((max - x - y + z)) +        x = abs(l[j + 1] - l[j]) +        y = abs(l[j] - l[j - 1]) +        z = abs(l[j + 1] - l[j - 1]) +        print((max - x - y + z))