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 a0, a1, a2 in zip(a, a[1:], a[2:]):

        if min(a0, a1, a2) == a1:

            ans.append(str(base - 2 * abs(a1 - min(a0, a2))))

        elif max(a0, a1, a2) == a1:

            ans.append(str(base - 2 * abs(a1 - max(a0, a2))))

        else:

            ans.append(str(base))

    return "\n".join(ans)





if __name__ == '__main__':

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

def solve(string):

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

    a = [0] + a + [0]

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

    base = sum(diff)

    ans = [str(base - diff[i] - diff[i + 1] + abs(a[i + 2] - a[i])) for i in range(n)]

    return "\n".join(ans)





if __name__ == '__main__':

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

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 a0, a1, a2 in zip(a, a[1:], a[2:]):
        if min(a0, a1, a2) == a1:
            ans.append(str(base - 2 * abs(a1 - min(a0, a2))))
        elif max(a0, a1, a2) == a1:
            ans.append(str(base - 2 * abs(a1 - max(a0, a2))))
        else:
            ans.append(str(base))
    return "\n".join(ans)


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

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


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

-    base = sum([abs(j - i) for i, j in zip(a, a[1:])]) -    ans = [] -    for a0, a1, a2 in zip(a, a[1:], a[2:]): -        if min(a0, a1, a2) == a1: -            ans.append(str(base - 2 * abs(a1 - min(a0, a2)))) -        elif max(a0, a1, a2) == a1: -            ans.append(str(base - 2 * abs(a1 - max(a0, a2)))) -        else: -            ans.append(str(base)) +    diff = [abs(j - i) for i, j in zip(a, a[1:])] +    base = sum(diff) +    ans = [str(base - diff[i] - diff[i + 1] + abs(a[i + 2] - a[i])) for i in range(n)]