n = int(input().strip())

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

a.append(0)

a.insert(0, 0)

s = [abs(j - i) for i, j in zip(a, a[1:])]

base = sum(s)

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

    if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):

        print(base)

    elif max(a[i - 1], a[i + 1]) < a[i]:

        print((base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))

    else:

        print((base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))

def solve(string):

    n, *a = list(map(int, string.split()))

    a = [0] + a + [0]

    base = sum([abs(j - i) for i, j in zip(a, a[1:])])

    ans = []

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

        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):

            ans.append(str(base))

        elif max(a[i - 1], a[i + 1]) < a[i]:

            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))

        else:

            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))

    return "\n".join(ans)





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

n = int(input().strip())
a = list(map(int, input().strip().split(" ")))
a.append(0)
a.insert(0, 0)
s = [abs(j - i) for i, j in zip(a, a[1:])]
base = sum(s)
for i in range(1, n + 1):
    if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):
        print(base)
    elif max(a[i - 1], a[i + 1]) < a[i]:
        print((base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))
    else:
        print((base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))

def solve(string):
    n, *a = list(map(int, string.split()))
    a = [0] + a + [0]
    base = sum([abs(j - i) for i, j in zip(a, a[1:])])
    ans = []
    for i in range(1, n + 1):
        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):
            ans.append(str(base))
        elif max(a[i - 1], a[i + 1]) < a[i]:
            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))
        else:
            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))
    return "\n".join(ans)


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

-n = int(input().strip()) -a = list(map(int, input().strip().split(" "))) -a.append(0) -a.insert(0, 0) -s = [abs(j - i) for i, j in zip(a, a[1:])] -base = sum(s) -for i in range(1, n + 1): -    if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]): -        print(base) -    elif max(a[i - 1], a[i + 1]) < a[i]: -        print((base - 2 * abs(a[i] - max(a[i - 1], a[i + 1])))) -    else: -        print((base - 2 * abs(a[i] - min(a[i - 1], a[i + 1])))) +def solve(string): +    n, *a = list(map(int, string.split())) +    a = [0] + a + [0] +    base = sum([abs(j - i) for i, j in zip(a, a[1:])]) +    ans = [] +    for i in range(1, n + 1): +        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]): +            ans.append(str(base)) +        elif max(a[i - 1], a[i + 1]) < a[i]: +            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1])))) +        else: +            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1])))) +    return "\n".join(ans) + + +if __name__ == "__main__": +    print((solve("\n".join([eval(input()), eval(input())]))))