def cost(a):

    prev = 0

    total = 0

    for ai in a:

        total += abs(ai - prev)

        prev = ai

    total += abs(0 - prev)

    return total



def cancel(a, i, total_cost):

    prev_spot = a[i-1]

    spot = a[i]

    next_spot = a[i+1]

    if spot >= min(prev_spot, next_spot) and spot <= max(prev_spot, next_spot):

        return total_cost

    else:

        if (next_spot >= prev_spot and spot < prev_spot) or (next_spot <= prev_spot and spot > prev_spot):

            return total_cost - 2 * abs(prev_spot - spot)

        if (next_spot >= prev_spot and spot > next_spot) or (next_spot <= prev_spot and spot < next_spot):

            return total_cost - 2 * abs(next_spot - spot)

        

    

if __name__ == '__main__':

    _ = int(eval(input()))

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

    a.append(0)

    no_cancellations = cost(a)

    for i in range(1, len(a)-1):

        print((cancel(a, i, no_cancellations)))
def cost(a):

    total = 0

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

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

    return total



def cancel(a, i, total):

    prev = a[i-1]

    spot = a[i]

    nxt = a[i+1]

    if (nxt >= prev and spot < prev) or (nxt <= prev and spot > prev):

        return total - 2 * abs(prev - spot)

    if (nxt >= prev and spot > nxt) or (nxt <= prev and spot < nxt):

        return total - 2 * abs(nxt - spot)

    return total

        

    

if __name__ == '__main__':

    _ = int(eval(input()))

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

    a.append(0)

    total = cost(a)

    for i in range(1, len(a)-1):

        print((cancel(a, i, total)))
def cost(a):
    prev = 0
    total = 0
    for ai in a:
        total += abs(ai - prev)
        prev = ai
    total += abs(0 - prev)
    return total


def cancel(a, i, total_cost):
    prev_spot = a[i - 1]
    spot = a[i]
    next_spot = a[i + 1]
    if spot >= min(prev_spot, next_spot) and spot <= max(prev_spot, next_spot):
        return total_cost
    else:
        if (next_spot >= prev_spot and spot < prev_spot) or (
            next_spot <= prev_spot and spot > prev_spot
        ):
            return total_cost - 2 * abs(prev_spot - spot)
        if (next_spot >= prev_spot and spot > next_spot) or (
            next_spot <= prev_spot and spot < next_spot
        ):
            return total_cost - 2 * abs(next_spot - spot)


if __name__ == "__main__":
    _ = int(eval(input()))
    a = [0] + list(map(int, input().split()))
    a.append(0)
    no_cancellations = cost(a)
    for i in range(1, len(a) - 1):
        print((cancel(a, i, no_cancellations)))

def cost(a):
    total = 0
    for i in range(1, len(a)):
        total += abs(a[i] - a[i - 1])
    return total


def cancel(a, i, total):
    prev = a[i - 1]
    spot = a[i]
    nxt = a[i + 1]
    if (nxt >= prev and spot < prev) or (nxt <= prev and spot > prev):
        return total - 2 * abs(prev - spot)
    if (nxt >= prev and spot > nxt) or (nxt <= prev and spot < nxt):
        return total - 2 * abs(nxt - spot)
    return total


if __name__ == "__main__":
    _ = int(eval(input()))
    a = [0] + list(map(int, input().split()))
    a.append(0)
    total = cost(a)
    for i in range(1, len(a) - 1):
        print((cancel(a, i, total)))

-    prev = 0 -    for ai in a: -        total += abs(ai - prev) -        prev = ai -    total += abs(0 - prev) +    for i in range(1, len(a)): +        total += abs(a[i] - a[i - 1]) -def cancel(a, i, total_cost): -    prev_spot = a[i - 1] +def cancel(a, i, total): +    prev = a[i - 1] -    next_spot = a[i + 1] -    if spot >= min(prev_spot, next_spot) and spot <= max(prev_spot, next_spot): -        return total_cost -    else: -        if (next_spot >= prev_spot and spot < prev_spot) or ( -            next_spot <= prev_spot and spot > prev_spot -        ): -            return total_cost - 2 * abs(prev_spot - spot) -        if (next_spot >= prev_spot and spot > next_spot) or ( -            next_spot <= prev_spot and spot < next_spot -        ): -            return total_cost - 2 * abs(next_spot - spot) +    nxt = a[i + 1] +    if (nxt >= prev and spot < prev) or (nxt <= prev and spot > prev): +        return total - 2 * abs(prev - spot) +    if (nxt >= prev and spot > nxt) or (nxt <= prev and spot < nxt): +        return total - 2 * abs(nxt - spot) +    return total -    no_cancellations = cost(a) +    total = cost(a) -        print((cancel(a, i, no_cancellations))) +        print((cancel(a, i, total)))